Doug Reilly's Weblog

Embedded Reporting of the Information Age...

SQL Syntax Error or Access Violation (42000)

I spent about an hour that I can never get back today tracking down a problem with a stored procedure I was writing.  The SP was a simple SAVE SP, with a test for existance of a row, and then an INSERT or UPDATE.  The error message (in all the tools I have) was an unhelpful SQL Syntax Error or Access Violation (Error 42000).

In the end, the error was not the screwy column and table names (some with spaces and very long).  I had used curly braces rather than parentheses in the INSERT statement. This slight difference resulted in this error message.  Sigh.

Comments

Brendan Green said:

Yeah, I helped out a mate the other day who had a zero instead of the letter "o" in the spelling of a column "ERROR".

Was hard to see the difference on his display, but we eventually fixed it. And like your post, the error message was very strange!
# May 26, 2005 6:29 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)