PDA

View Full Version : Incorrect Syntax near ...


plasterx
12-11-2005, 07:01 AM
hey all,i've got this error ...

it said incorrect syntax near the word 'user'. i've tried to print out the sql by doin a response.write and it works. So what could be wrong ??



sql = "SELECT * FROM user where userID = '"&chkUserID&"' and password='"&chkPassword& "'"

BarrMan
12-11-2005, 12:42 PM
Is userid a number? if so the query shouldn't have the single quote on the userid.

Roelf
12-11-2005, 07:28 PM
i think user is a reserved word, try to use brackets around it: [user]