By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,162 Members | 1,061 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,162 IT Pros & Developers. It's quick & easy.

Microsoft JET Database Engine error '80040e14' Syntax error (missing operator)

P: 3
The following is my code..... I was trying to accept users' feed back and save it to the database....

It works once and then keeps bringing the above error message...

(Microsoft..... Syntax error (Mission Operator)...)...

COULD YOU PLEASE HELP ME OUT!!!

NOTE: All the fields in the database are of type TEXT...

Thank YOU!!!
<body>
<%
dim Ssection,stype,qn1,qn2,qn3,qn4,qn5,qn6,qn7,qn8,qn9 ,qn10,qn11,qn12,qn13,qn14,qn15,qn16,qn17,sql
dim con,rs,filePath,boolFound


Ssection=request.Form("Section")
stype=Request.Form("Stype")
qn1=Request.Form("Qnum1")
qn2=Request.Form("Qnum2")
qn3=Request.Form("Qnum3")
qn4=Request.Form("Qnum4")
qn5=Request.Form("Qnum5")
qn6=Request.Form("Qnum6")
qn7=Request.Form("Qnum7")
qn8=Request.Form("Qnum8")
qn9=Request.Form("Qnum9")
qn10=Request.Form("Qnum10")
qn11=Request.Form("Qnum11")
qn12=Request.Form("Qnum12")
qn13=Request.Form("Qnum13")
qn14=Request.Form("Qnum14")
qn15=Request.Form("Qnum15")
qn16=Request.Form("Qnum16")
qn17=request.Form("Qnum17")

'SELECT [fields] FROM [table] WHERE [expression]
'INSERT INTO [table] ([field1],...) VALUES ([value1],...) WHERE [expression]
'UPDATE [table] SET [field1]=[value1] WHERE [expression]


set con=Server.CreateObject("ADODB.Connection")
set rs=Server.CreateObject("ADODB.Recordset")

con.Provider="Microsoft.Jet.OLEDB.4.0;"
filePath = Server.MapPath("compute.mdb")
con.Open "C:\inetpub\wwwroot\CSF\Database\CSFSystem2.md b"


sql = "INSERT INTO [LastTable]([SSection],[SType],[QOne],[QTwo],[QThree],[Q4],[Q5],[Q6],[Q7],[Q8],[Q9],[Q10],[Q11],[Q12],[Q13],[Q14],[Q15],[Q16],[Q17]) values ('" + Ssection + "','" + stype + "','" + qn1 +"','" + qn2 + "','" + qn3 + "','" + qn4 + "','" + qn5 + "','" + qn6 + "','" + qn7 + "','" + qn8 + "','"+ qn9 + "','" + qn10 + "','" + qn11 + "','" + qn12 + "','" + qn13 + "','" + qn14 + "','" + qn15 + "','" + qn16 + "','" + qn17 + "')"

rs.open sql,con

<%
response.Redirect("SuccessSave.html")
%>

</body>
</html>
Jan 19 '12 #1
Share this Question
Share on Google+
1 Reply


100+
P: 144
I tested the Query and it works--No error. Look at your connection setup. I know you have a space towards the end in the string:

"C:\inetpub\wwwroot\CSF\Database\CSFSystem2.md b"

I write my stuff a little different so I'll have to write something to test your method. An operator error means you left something out in the query itself, or it trying to parse some other line and thinks you left something out, like a syntax mistake in you code; possibly it thinks the "b" on the end is a switch? Let me know if these observations gets the issue resolved.
Jan 19 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.