Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/05/2011, 06:47
Avatar de lokoman
lokoman
 
Fecha de Ingreso: septiembre-2009
Mensajes: 502
Antigüedad: 14 años, 7 meses
Puntos: 47
Respuesta: Concatenar sentencia sql larga

Hola!!
Código vb:
Ver original
  1. sql = "insert into facturas (numfacPri, numfacSec, " _
  2.     & "fechafac, CodCli, Nombredecliente, Domicilio, Localidad, ConddeVenta, NrodeCUIT, NumRemito, " _
  3.     & "Cant1, Cant2, Cant3, Cant4, Cant5, Cant6, codart1 , codart2, codart3, codart4, codart5, codart6, " _
  4.     & "Importe1, Importe2, Importe3, Importe4, Importe5, Importe6, Total, Subtotal, Pesos) Values (" _
  5.     & lblNumfacPri.Caption & ", " & lblNumfacSec.Caption & ", '" & lblFecha & "', " & CodCli _
  6.     & ", '" & cmbNombre & "', '" & txtDomicilio.Text & "', '" & txtLocalidad.Text & "', '" _
  7.     & txtCond.Text & "', " & txtCuit.Text & ", '" & txtRemito.Text & "', " & txtCant.Text & ", " _
  8.     & txtCant2.Text & ", " & txtCant3.Text & ", " & txtCant4.Text & ", " & txtCant5.Text & ", " _
  9.     & txtCant6.Text & ", '" & codart1 & "', '" & codart2 & "', '" & codart3 & "', '" & codart4 _
  10.     & "', '" & codart5 & "', '" & codart6 & "', " & txtImp.Text & ", " & txtImp2.Text & ", " _
  11.     & txtImp3.Text & ", " & txtImp4.Text & ", " & txtImp5.Text & ", " & txtImp6.Text & ", " _
  12.     & txtTotal.Text & ", " & txtSubtotal.Text & ", " & txtPesos.Text & ")"

Verifica que todo guarde correctamente!