Código:
Private Sub psGuardar_Usuario()
Dim rs As ADODB.Recordset
On Error GoTo Error_Handler
Set rs = New ADODB.Recordset
Call modMySQL.psConectar
With rs
.ActiveConnection = modMySQL.conConexion
.CursorLocation = adUseClient
.CursorType = adOpenDynamic
.LockType = adLockOptimistic
.Open "INSERT INTO tabla(campos) VALUES(valores)"
If .State Then .Close
If modMySQL.conConexion.State Then modMySQL.conConexion.Close
End With
Set rs = Nothing
Exit Sub
Error_Handler:
MsgBox Err.Description & " (" & Err.Number & ").", vbCritical
End Sub
sigue estando mal, con un recordset no se insertan registros, es con un objeto command.
saludos.
Seba con un Recorset si se puede insertar registros...!






Autor



En línea



