Error al actualizar
Sorry q los moleste tanto ahora tengo otro problema... lo q sucede es q tengo q actualizar datos de varios registros a la vez... el codigo q tengo es el sgte...
Dim x As Integer
While Not x = lstFactura.ListCount
Set cmVale = New ADODB.Command
With cmVale
.ActiveConnection = cn
.CommandType = adCmdText
.CommandText = "update VALE_RECARGA SET NRO_FACTURA = '" & txtNumFactura.Text & "', VR_ESTADO='A'" & _
" where VR_NRO = '" & lstFactura.List(x) & "'"
.Execute
End With
Wend
lo q pasa q la condicion esta en un list... y tenho q actualizar todos aquellos registros cuyo pk esta en el list y no se como hacerlo... intente de esta manera pero me sale error.. por favor denme alguna sugerencia... muchas gracias...
Saludos
Dim x As Integer
While Not x = lstFactura.ListCount
Set cmVale = New ADODB.Command
With cmVale
.ActiveConnection = cn
.CommandType = adCmdText
.CommandText = "update VALE_RECARGA SET NRO_FACTURA = '" & txtNumFactura.Text & "', VR_ESTADO='A'" & _
" where VR_NRO = '" & lstFactura.List(x) & "'"
.Execute
End With
Wend
lo q pasa q la condicion esta en un list... y tenho q actualizar todos aquellos registros cuyo pk esta en el list y no se como hacerlo... intente de esta manera pero me sale error.. por favor denme alguna sugerencia... muchas gracias...
Saludos
