Problema con insert
Publicado por macro (3 intervenciones) el 12/04/2007 22:42:54
para empesar todo los datos de la tabla son string y cuando agrego me sale un problema rs.close y esto solo me deja meter el primer dato aLGUIEN ME PUEDE DECIR CUAL ES EL DRAMA Y SI ME FALTA ALGO
Private Sub Comando13_Click()
Set rs = New ADODB.Recordset
Set cn = Application.CurrentProject.Connection
rs.Open "INSERT INTO Empleados(Rut_empleado, Nom_emp, ape_emp)VALUES ('" & Me.Texto6.Value & "', " & Val(Me.Texto2.Value) & " , " & Val(Me.Texto4.Value) & " )", cn, adOpenDynamic, adLockPessimistic
rs.EOF
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
End Sub
Private Sub Comando13_Click()
Set rs = New ADODB.Recordset
Set cn = Application.CurrentProject.Connection
rs.Open "INSERT INTO Empleados(Rut_empleado, Nom_emp, ape_emp)VALUES ('" & Me.Texto6.Value & "', " & Val(Me.Texto2.Value) & " , " & Val(Me.Texto4.Value) & " )", cn, adOpenDynamic, adLockPessimistic
rs.EOF
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
End Sub
Valora esta pregunta


0