Update Access database with ASP

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
 
D

Dan Artuso

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"))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top