| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement. /signupconf.asp, line 9 Here's the code up to the point that error occurs. (Red marks are my edits for this post) <% dim oConn dim oRs Set oConn = Server.CreateObject("ADODB.Connection") oConn.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)}" oConn.ConnectionString = oConn.ConnectionString & ";DBQ=" & server.MapPath("login.mdb") oConn.Open line 9 -> set oRs = oConn.Execute("INSERT INTO tblLoginInfo(usrnm,psswrd,rlnm,eml,qstn,answr) VALUES('" & request.Form("usrnm") & "','" & request.Form("psswrd") & "','" & request.Form("rlnm") & "','" & request.Form("eml") & "','" & request.Form("qstn") & "','" & request.Form("answr") & "'") %> As you can see, it's pretty standard stuff...although perhaps not standard enough...stupid syntax error. I've condensed down the field names in the Access database and in my form to try and avoid any reserved words. I've also tried replacing all the request.Form statements with static values for testing purposes, but that didn't seem to work either. I've been searching forums for hours and can't seem to come up with a solution. Any ideas? |
|
#2
|
|||
|
|||
|
Check to see if in the insert statement you have all the column names and if they are
spelled out right as it is in your table. Do the insert statement once outside asp and then copy the statement to asp . At least you minimize the SQl synatx You can then rule out the sql syntax and focus on asp syntax |
|
#3
|
|||
|
|||
|
Thanks for the help. I actually got it figured out... Line 9 should end like this "')") instead of this "'").
Thanks for the help anyway. |
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > Syntax error in INSERT INTO statement. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|