
04/08/2003, 05:20
|
 | | | Fecha de Ingreso: agosto-2003 Ubicación: Cuenca
Mensajes: 6
Antigüedad: 21 años, 9 meses Puntos: 0 | |
Mira antes de meter cualquier dato a la consulta verifica que no lleve comillas ' ya que te dara errores y tambien mete los nombre de columnas entre corchetes [nombre columna] Te mando una función para verificar que no tienes ' y silas tiene mete 2:
Function QuitarComillas(StrCadena)
QuitarComillas=Replace(StrCadena,"'","''")
End Funtion
' Montamos la Instrucción
Sql = "INSERT INTO tblPreguntas (IdTema,Asunto,Comentario,De,Email) " & _
"VALUES (" & Request.Form("IDForo") & ",'" & _
QuitarComillas(Server.HTMLEncode(Request.Form("tbA sunto)& "','" & _
QuitarComillas(Server.HTMLEncode(Request.Form("tbM ensaje)& "','" & _
QuitarComillas(Server.HTMLEncode(Request.Form("tbN ombre")) & "','" & _
QuitarComillas(Server.htmlEncode(Request.Form("tbE mail")) & "');"
Espero que te ayude |