Reputation: 91
First of all, I'm new to the club and must say I find it a very interesting site, and it has really helped me a lot with my coding experiences in C#. Thanks for that.
On a total different note, I'm getting the follow error at one of our customers (we resell document management software). And I'm trying to determine if this error message as stated below can cause performance issues.
Google'ing this error message has already informed me that it can be caused when using Reserved Words as Column Names.
24-4-2012 11:16:49 [ERROR] :There was an error parsing the query. [ Token line number = 1,Token line offset = 77,Token in error = 66667 ] UPDATE WS_LOCATION SET Frequency = @FreqParams, LUTime = @LUTimeParams, Client = '', Matter = '' WHERE WSLoc_ID = '22' occured on InsertIntoLocationTables.
I'm not very familiar with all of the Reserved Words in SQL, perhaps any of you can help me out with determining what is the cause of this error?
It's a local SQL Compact database bytheway (.sdf).
Upvotes: 1
Views: 2117
Reputation: 6703
Enclosing your names with brackets will prevent the error of using T-SQL reserved words.
UPDATE [WS_LOCATION] SET
[Frequency] = @FreqParams,
[LUTime] = @LUTimeParams,
[Client] = '',
[Matter] = ''
WHERE [WSLoc_ID] = '22';
Upvotes: 1
Reputation: 10359
If you have a problem with reserved words, prefix your column names with the table name :
UPDATE WS_LOCATION
SET WS_LOCATION.Frequency = @FreqParams, WS_LOCATION.LUTime = @LUTimeParams, WS_LOCATION.Client = '', WS_LOCATION.Matter = ''
WHERE WS_LOCATION.WSLoc_ID = '22'
Upvotes: 0