Hey, folks,
I'm trying to run a SQL query against an Access database via an ASP page that uses information entered into a form, and keep getting the following error message:
"Characters found after end of SQL statement"
The code generating the error looks like this:
I've tried playing with the end quotes on the SQL statement a million ways, but can't get it to stop generating this error. Can anyone tell me what I'm doing wrong?
Thanks,
M
I'm trying to run a SQL query against an Access database via an ASP page that uses information entered into a form, and keep getting the following error message:
"Characters found after end of SQL statement"
The code generating the error looks like this:
Code:
If Request.Form("course") <> "" Then
SQL = "Select * FROM Items "
SQL = SQL & "WHERE Course_Number LIKE '" & Request.Form("course") & "'"
End If
Set objRS = objConn.Execute(SQL)
I've tried playing with the end quotes on the SQL statement a million ways, but can't get it to stop generating this error. Can anyone tell me what I'm doing wrong?
Thanks,
M