Visual Basic - AddNew Con Data Environment

Life is soft - evento anual de software empresarial
 
Vista:

AddNew Con Data Environment

Publicado por Hernan (6 intervenciones) el 29/09/2005 22:44:48
AddNew Con Data Environment

HOLA, ACA DEJO ESTE CODIGO, ME AGREGA UN EL DNI K KARGO, EN UN REGISTRO NUEVO, OSEA, EN UN PROXIMO REGISTRO, Y EN EL REGISTRO K INTENTO KARGAR
ME PONE EL DNI ANTERIOR.
NO SE CUAL PUEDE SER EL ERROR.
GRACIAS.

Private Sub cmd_add_Click() 'ERROR ME AGREGA UN DOCUMENTO DE MASSS!
DataEnvironment1.rsEmpleados.AddNew 'ORDEN DE AGREGAR
'ACA VAN LOS CAMPOS.. GUARDA KON LOS NOMBRES DE LAS CASILLAS Y LOS CAMPOS DE LA BD!!!
DataEnvironment1.rsEmpleados.Fields("nombre") = txtnombre.Text
DataEnvironment1.rsEmpleados.Fields("apellido") = txtapellido.Text
DataEnvironment1.rsEmpleados.Fields("telefono") = txttelefono.Text
DataEnvironment1.rsEmpleados.Fields("direccion") = txtdireccion.Text
DataEnvironment1.rsEmpleados.Fields("id_doc") = txtdocum.Text
DataEnvironment1.rsEmpleados.Fields("num_doc") = txtnum_doc.Text
DataEnvironment1.rsEmpleados.Update 'UPDATEO PARA K KEDE
Label1.Caption = DataEnvironment1.rsEmpleados.Fields("ID_EMPLEADO") ' MUESTRA EL ID DEL EMPLEADO
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:AddNew Con Data Environment

Publicado por HERNAN (6 intervenciones) el 02/10/2005 00:03:57
vamo vamo k es de apuro..
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

RE:AddNew Con Data Environment

Publicado por Ismael (3 intervenciones) el 05/10/2005 08:29:52
Hola,

Yo también tengo problemas tratando de añadir datos a la base de datos, y es que me dice que puede ser una limitación del proveedor al hacer update, y de más. Pero debe poderse, este es el código que yo estoy usando. Si le encuentras solución te agradecería me dijeras como, al igual que yo.

Private Sub guardar_Click()
With DE1.rsFactura
.Open
.MoveLast
nfactura = .Fields(0).Value + 1
Text8.Text = nfactura
.AddNew
.Fields(1).Value = text7(6).Text
.Fields(2).Value = Text3.Text
.Fields(3).Value = Date
.Fields(4).Value = Text1(0).Text
.Fields(0).Value = Text8.Text
.Update
.Close
End With
End Sub
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