Update Access database with ASP

  • Thread starter Thread starter Nakedwalls
  • Start date Start date
N

Nakedwalls

Hi everyone,

I'm trying to edit an Access database using ASP. The user inputs the
changes into an HTML form which passes the variables to EDIT.ASP. I
keep getting an Illegal Arguement error with my SQL query though.

Your comments would be much appreciated!

Here is my SQL query:

strSQLQuery = sql = "UPDATE news SET news='" & request.form("news") &
"' WHERE ID='" & request.form("ID") & "'"


The "ID" is an Autonumber, not sure if this is an issue?

Thanks in advance,

Tom
 
Hi,
Did you do a Response.Write strSQLQuery to see what the string evaluates to?
Also, if ID is numeric, you shouldn't delimit the criteria with single quotes and you might
have to use CInt(request.form("ID"))
 
Back
Top