Ver Mensaje Individual
  #3 (permalink)  
Antiguo 26/04/2009, 21:29
vicentecamesella
 
Fecha de Ingreso: abril-2009
Mensajes: 136
Antigüedad: 15 años, 1 mes
Puntos: 1
Respuesta: Importantisimo visual basic [Usar variable en consulta SQL]

Dim var As String
var = Text1.Text


cmmm.ActiveConnection = cnn
cmmm.CommandType = adCmdText
cmmm.CommandText = "INSERT INTO " & var & _
" (Gastopor, Montopor, Fechadelgasto, Motivodelgasto) " & _
"VALUES ('" & _
Text3 & "', '" & Text4 & "', '" & Text5 & "', '" & Text6 & "')"
cmmm.Execute