Member_2_6479049
asked on
Row cannot be located for updating (VB6 + MySQL)
Hi guys,
I'm having a problem when I tried to update a record on MySQL table, even if I don't change any data on the form.
I have made a lot of applications with the same code but this is the first time I got this error.
Run-time error '2147217861(80040e38)':
Row cannot be located for updating. Some values may have been changed since it was last read.
*****************CODE***** *********
********** ***
I Hope you guys can help me on this problem.
thanks' in advance.
I'm having a problem when I tried to update a record on MySQL table, even if I don't change any data on the form.
I have made a lot of applications with the same code but this is the first time I got this error.
Run-time error '2147217861(80040e38)':
Row cannot be located for updating. Some values may have been changed since it was last read.
*****************CODE*****
Set rsTransacciones = New ADODB.Recordset
cSQLActualiza = "SELECT * FROM Transacciones WHERE Clave = '" & npClaveRegistro & "'"
rsTransacciones.Open cSQLActualiza, conn, adOpenStatic, adLockOptimistic
If Not (rsTransacciones.BOF And rsTransacciones.EOF) Then
rsTransacciones!Num_expediente = Trim(txtNumExpediente.Text)
rsTransacciones!Nombre = Trim(txtNombre.Text)
rsTransacciones!Paterno = Trim(txtPaterno.Text)
rsTransacciones!Materno = Trim(txtMaterno.Text)
rsTransacciones!Tipo_tramite = Trim(txtTramite.Text)
rsTransacciones!Numero_oficio = Trim(txtNumeroDocto.Text)
rsTransacciones!Autoridad_remitente = Trim(txtAutoridadRemitente.Text)
rsTransacciones!Ciudad_residencia = Trim(txtCiudad.Text)
rsTransacciones!Autoridad_solicita = Trim(txtAutoridadSolicita.Text)
rsTransacciones!Promovente = Trim(txtPromovente.Text)
rsTransacciones!Solicitud = Trim(txtSolicitud.Text)
rsTransacciones!Seguimiento = Trim(txtSeguimiento.Text)
rsTransacciones!Usuario_actualiza = cgUsuario
rsTransacciones!Fecha_actualiza = Format(Date, "yyyy-mm-dd")
rsTransacciones!Hora_actualiza = Format(Time, "hh:mm:ss")
If chkConcluir.Value > 1 Then
rsTransacciones!Estatus = "C"
rsTransacciones!Usuario_concluye = cgUsuario
rsTransacciones!Fecha_concluye = Format(Date, "yyyy-mm-dd")
rsTransacciones!Hora_concluye = Format(Time, "hh:mm:ss")
Else
rsTransacciones!Estatus = "A"
End If
rsTransacciones.Update
Else
MsgBox "NO SE ENCONTRO EL REGISTRO PARA ACTUALIZAR", vbCritical, "Atención"
frmActualizaciones.MousePointer = 0
Exit Sub
End If
**************************I Hope you guys can help me on this problem.
thanks' in advance.
ASKER
Thank you!
Yes Guy I have a primary key named Clave.
Yes Guy I have a primary key named Clave.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have not received any solution, so I did myself!
ASKER
I have not received any solution, so I did myself!
does the table have a primary key?