error de comilla
Publicado por nelem (68 intervenciones) el 28/09/2005 12:57:47
Hola me podeis ayudar me da n error al intentar insertar un nombre que contena comillas por ejemplo O'DONEE yo inserto con la siguiente instruccion:
sSQL = "INSERT INTO operarios (nombre,direccion,poblacion,dni,tel,comision,notas) " & _
"VALUES( '" & oper.txtnombre.Text & "','" & oper.txtdireccion.Text & "','" & oper.txtPoblacion.Text & "','" & oper.txtcif.Text & "','" & oper.txttelf1.Text & "','" & oper.Txtcomision.Text & "','" & tran.txtobservaciones.Text & "' )"
Dim Comando As New OleDbCommand(sSQL, Conexion)
Si me podeis ayudar os lo agradeceria muxo. un saludo. Gracias
sSQL = "INSERT INTO operarios (nombre,direccion,poblacion,dni,tel,comision,notas) " & _
"VALUES( '" & oper.txtnombre.Text & "','" & oper.txtdireccion.Text & "','" & oper.txtPoblacion.Text & "','" & oper.txtcif.Text & "','" & oper.txttelf1.Text & "','" & oper.Txtcomision.Text & "','" & tran.txtobservaciones.Text & "' )"
Dim Comando As New OleDbCommand(sSQL, Conexion)
Si me podeis ayudar os lo agradeceria muxo. un saludo. Gracias
Valora esta pregunta


0