Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

any escape sequence to get around odbc syntax error??

Status
Not open for further replies.

dendog

Programmer
Jun 28, 2001
53
US
hey all--
Im getting an ODBC sytax error when I try to run an update statement where i am trying to modify the value feild of the table. It is giving me this error because value happens to be a special key term of the odbc driver so the driver is getting confused--i was wondering if there was any escape sequence that should be used so that the driver would not get confused when trying to run a statement like
int change = stmt.executeUpdate("update employee set value='" + new_id + "' where keyname='" + keynameCurr+ "'");
Thank you very much fro your help!!!
 
Try using brackets to delimit column names.

stmt.executeUpdate("update employee set [value]='" + new_id + "' where [keyname]='" + keynameCurr + "'");
Terry

"The greatest obstacle to discovery is not ignorance -- it is the illusion of knowledge." - Daniel J Boorstin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top