Ver Mensaje Individual
  #8 (permalink)  
Antiguo 02/11/2011, 10:00
sachis77
 
Fecha de Ingreso: octubre-2011
Ubicación: COLOMBIA, Medellín
Mensajes: 42
Antigüedad: 12 años, 5 meses
Puntos: 0
Respuesta: programacion el visual basic

peo al iniciar la orden de guardar también debe ir primero el código de tipos:
If txtctipo.Text.Length = 0 Then
MessageBox.Show("codigo no valido", "ERROR")
txtctipo.Focus()
Exit Sub
End I

como iria esta parte

sql = "update subtprod set nomstp='" & nom & "' where codt =" & ct & " And codsubtp = " & cs & ""


esta:
micomando = New MySqlCommand("select count(*)from subtprod =" & txtcsubtipo.Text & "", miconexion)
xcantidad = micomando.ExecuteScalar

y esta:

ElseIf xopcion = 2 Then
sql = "update subtprod set nomstp='" & nom & "' where codt =" & ct & " And codsubtp = " & cs & ""