Greetings All,
I am trying to update a database in which each record has 23 fields. One of my records is throwing the following error:
[ComputerEase][ODBC Driver]Expected lexical element not found: <identifier>
I have narrowed my problem down to one field called "notes." The column type is "STRING" and the column length is "64000." Can anyone see something obvious in the following command that would cause this error? Is there a particular character that is causing my ODBC driver to choke?
I am assuming that the structure of my command is correct because it works for all the other 8,000+ records in this particular database. The problem must lie somewhere within the single quotes. YES - NO ?
UPDATE dpEQUIPMENT SET notes = 'HARTMAN#1270799-02/1265998-05/1272807-01 8/7,9/21,10/5/01:(42) STN-296T8HO-277V-EB81 METALUX (E).:HARTMAN#1276799-01 11/2/01:(1) MHSS-PD25-M-400-2-LL-FH1-MWS LUMARK(A):HARTMAN#1265998-01 7/30/1 (38)2GR8-332A-277V-EB81 METALUX (D).C/T#1110:BILLED TO I.WEAVER' WHERE sitenum = '2850NAVE' AND equipnum = 'FIXTMIS5'
Thanks in advance for any help.
John Miller
Database Command Throwing Error
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Database Command Throwing Error
What is the DB you are using ?
I would try to run the same query... but without the "#" "/" "." ":" and "," characters, just to test.
Some leads from google :
-could be the "#" character (try to remove it), that is interpreted as an escape sequence for a datetime / timestamp column
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=63511
-could be a column that has a NULL
http://www.forumtopics.com/busobj/viewt ... 2a845421fa
-could be double quotes issue
http://archive.qodbc.com/forum2ffb.html
-try to use [] or {} to isolate the table name : UPDATE [dpEQUIPMENT]
-put ( ) to close your condition : (sitenum = '2850NAVE' AND equipnum = 'FIXTMIS5')
-which data type are sitenum and equipnum ?
I would try to run the same query... but without the "#" "/" "." ":" and "," characters, just to test.
Some leads from google :
-could be the "#" character (try to remove it), that is interpreted as an escape sequence for a datetime / timestamp column
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=63511
-could be a column that has a NULL
http://www.forumtopics.com/busobj/viewt ... 2a845421fa
-could be double quotes issue
http://archive.qodbc.com/forum2ffb.html
-try to use [] or {} to isolate the table name : UPDATE [dpEQUIPMENT]
-put ( ) to close your condition : (sitenum = '2850NAVE' AND equipnum = 'FIXTMIS5')
-which data type are sitenum and equipnum ?
-
- Posts: 116
- Joined: Mon Apr 30, 2007 3:33 pm
Re: Database Command Throwing Error
Greetings,
The program our company uses is called ComputerEase.
I am able to UPDATE the first half of the field and then the second half. All characters are accepted.
Then I started looking at the length of the field. It will accept no more than 255 characters even tho the length of the field is set to 64000.
Somehow ComputerEase accepts the longer length, but when I use live code, it rejects it.
Any ideas?
John
The program our company uses is called ComputerEase.
I am able to UPDATE the first half of the field and then the second half. All characters are accepted.
Then I started looking at the length of the field. It will accept no more than 255 characters even tho the length of the field is set to 64000.
Somehow ComputerEase accepts the longer length, but when I use live code, it rejects it.
Any ideas?
John