Visual Basic - Error 3155: Fallo INSERT en tabla vinculada

Life is soft - evento anual de software empresarial
 
Vista:

Error 3155: Fallo INSERT en tabla vinculada

Publicado por juani_mar (1 intervención) el 13/03/2010 19:37:39
Hola a todos, espero alguien pueda ayudarme...
Tengo un inconveniente para guardar datos desde visual basic 6 a mysql, utilizo conexion DAO porque me parece mas sencilla. Al correr el programa, se detiene en la linea .Update y me da el mensaje de error 3155: Fallo INSERT en tabla vinculada, pero no detecto donde esta el problema en mi codigo. Aca les muestro:
Private Sub cmdguardar_Click()
With contrib
.AddNew
.Fields("con_nombre") = UCase(txtnombre.Text)
.Fields("con_apellido") = UCase(txtapellido.Text)
.Fields("con_ced_id") = Val(txtcedid.Text)
If txtrazonsoc.Text <> "" Then
.Fields("con_razon_social") = UCase(txtrazonsoc.Text)
Else
.Fields("con_razon_social") = ""
End If
If txtruc.Text <> "" Then
.Fields("con_ruc") = txtruc.Text
Else
.Fields("con_ruc") = ""
End If
If txtdireccion.Text <> "" Then
.Fields("con_direccion") = UCase(txtdireccion.Text)
End If
If cbosexo.ListIndex <> -1 Then
.Fields("con_sexo") = cbosexo.ItemData(cbosexo.ListIndex)
End If
If txttelefono.Text <> "" Then
.Fields("con_telefono") = txttelefono.Text
End If
If txtcelular.Text <> "" Then
.Fields("con_celular") = txtcelular.Text
End If
If txtfecnac.Text <> "" Then
.Fields("con_fec_nac") = Trim(txtfecnac.Text)
End If
If txtlugnac.Text <> "" Then
.Fields("con_lug_nac") = UCase(txtlugnac.Text)
End If
If txtemail.Text <> "" Then
.Fields("con_email") = LCase(txtemail.Text)
End If
If txtrmc.Text <> "" Then
.Fields("rmc") = Val(txtrmc.Text)
End If
If cbociudad.ListIndex <> -1 Then
.Fields("id_ciudad") = cbociudad.ItemData(cbociudad.ListIndex)
End If
If cbobarrio.ListIndex <> -1 Then
.Fields("id_barrio") = cbobarrio.ItemData(cbobarrio.ListIndex)
End If
If cbonacional.ListIndex <> -1 Then
.Fields("id_nacionalidad") = cbonacional.ItemData(cbonacional.ListIndex)
End If
If cboestado.ListIndex <> -1 Then
.Fields("id_estado_civil") = cboestado.ItemData(cboestado.ListIndex)
End If
If cboconcateg.ListIndex <> -1 Then
.Fields("id_categ") = cboconcateg.ItemData(cboconcateg.ListIndex)
End If
If cbogruposang.ListIndex <> -1 Then
.Fields("id_grupo_sang") = cbogruposang.ItemData(cbogruposang.ListIndex)
End If
.Update 'EN ESTA LINEA ES DONDE ME ARROJA EL ERROR
End With
End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Error 3155: Fallo INSERT en tabla vinculada

Publicado por juan carlos (518 intervenciones) el 15/03/2010 03:47:27
revisa que las variables esten bien vinculadas con las cajas de textos
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar