Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to insert double quote " into database

843859Oct 6 2005 — edited Oct 7 2005
I am using statement instead of prepared statement, now have a proble insert the double quote " into db,
if the string like : This doc name "cls",

if I tried str = str.replaceAll(" \" ", " \''"),

after run it in dabase the result is : This doc name ?cls?,


Maybe if I use prepare statement can solve the problem, but just wondering anyone know how to do it with statement sql string?

Thanks !
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 4 2005
Added on Oct 6 2005
7 comments
969 views