Forum Moderators: open
I am having a wierd problem. I am getting an error saying there is something wrong with my SQL statement. The error says:
Syntax error in UPDATE statement.
However, I can find no problem. I have narrowed the problem to the field 'RealName' in the 'Users' table. If you user has not entered a real name then the database enters it as 'No Real Name' instead of it being blank. If I leave the field blank the query looks like this:
UPDATE Users SET Password='xxxxxx', RealName='No Real Name' WHERE Username='chris_felstead'
If I give it the value 'Test Real Name' then the query looks like this:
UPDATE Users SET Password='xxxxxx', RealName='Test Real Name' WHERE Username='chris_felstead'
Where I leave the field blank or not, the code falls over. Can anyone see anything I have missed.
Chris
I had the same problem with "date" It ran fine for a while then gave me syntax errors later. It was the word "date" after all.
Try changing the name of the field and rewriting the query.
The syntax is correct, but I do suspect reserved words.
I knwo when my host added a service pack that included MDAC 2.6, lots of wierd things happened with ASP/Access.
<added>Just found this one..
Note that 'password' causes 0x80040E14 errors when used in an Access table
Reserved Words [aspfaq.com]
[/added]