apostrophe problem for a preparedstatement
Posted by: C Leung
Date: January 06, 2005 04:50AM


I have been trying to insert and update database records with data including apostrophe. I have been reading some articles and setString() in preparedStatement should escape all apostrophe in the string for me. However, it keeps giving me errors starting from near the first apostrophe.

I have tried strings with multiple apostrophes and i saw from the error message that there were two back slashes in front of the apostrophe that setString() has added for me. I have tried putting the back slash myself, and i ended up having many many back slashes after setString().

Can somebody please help me deal with this problem with apostrophes.

Btw, i have tried JConnector 3.0 and 3.1 and both act the same.


Options: ReplyQuote

Written By
apostrophe problem for a preparedstatement
January 06, 2005 04:50AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.