Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: syntax error in SQL statement


Message #1 by "fareed parhad" <fareed_parhad@e...> on Fri, 14 Dec 2001 14:50:21
I'm trying to insert some data into an access database but on running the 

ASP it returns a syntax error:



Microsoft VBScript compilation error '800a03ea' 



Syntax error 



/chart test/Register.asp, line 26 



sSQL = "Insert into admin (Firstname,lastname,username,password) Values" &

--------------------------------------------------------------------------^

"('"& Ucase(Request("firstname")) & "', '"& Request("lastname") & "', '"&

Request("userid") & "', '" & Request("password") & "')"

conn.Execute sSQL,adCmdText



HELP?!



Message #2 by "Gerald, Rand" <RGerald@u...> on Fri, 14 Dec 2001 18:39:12 -0600
If the ASP routine is trying to process a multi-line statement you may

require a continuation character "_" at the end of each continued line.



Try adding a space and an underscore after each of the ampersands at the end

of a line.



Rand



-----Original Message-----

From: fareed parhad [mailto:fareed_parhad@e...]

Sent: Friday, December 14, 2001 8:50 AM

To: Access

Subject: [access] syntax error in SQL statement



I'm trying to insert some data into an access database but on running the

ASP it returns a syntax error:



Microsoft VBScript compilation error '800a03ea'



Syntax error



/chart test/Register.asp, line 26



sSQL = "Insert into admin (Firstname,lastname,username,password) Values" &

--------------------------------------------------------------------------^

"('"& Ucase(Request("firstname")) & "', '"& Request("lastname") & "', '"&

Request("userid") & "', '" & Request("password") & "')"

conn.Execute sSQL,adCmdText



HELP?!









  Return to Index