Hi,
I have an Insert into function returns the error Syntax error (missing operator) in query expression when text the single quote is send to the access db from a form.
Can you help me?
' I need to replace this with the ascii ' before the query is sent.
here is the scode
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Response.Buffer=True%>
<!-- #include file="Conn.asp" -->
<%
check_query = "Select email from list WHERE email ='" & request.form("T2") & "'"
Set RSc = Conn.Execute(check_query)
IF RSc.EOF OR RSc.BOF THEN
SQL_query = "INSERT INTO anng (nome, email, cap, ctt, materia, testo) VALUES ('" & request.form("T2") & "','" & request.form("T1") & "','" & request.form("T3") & "','" & request.form("T4") & "','" & request.form("T5") & "','" & request.form("T6") & "')"
Conn.Execute(SQL_query)
Conn.Close
%>
<html>
<head>
<title>Thanks</title>
<script language="javascript">
<!--
var timer = null
function closeWin() {
self.close()
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" onLoad="timer=setTimeout('closeWin()',9000)">
<h1 align="center"><font size="3">Tkanks</font></h1>
<p align="center"><img border="0" src="thumbsup.gif" width="176" height="225"></p>
</body>
</html>
<%
ELSE
Response.Write "SORRY that email is already registered.<BR>Go back and enter another email."
End If
Set RSc = Nothing
%>
here I need to handle fields having the only character is the single quote
Thanks,