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 put apostrophes in a query

843854Jun 16 2004 — edited Jun 16 2004
Hi,

We use JDK1.2.2 with Oracle 8. We are using JDBC with the Oracle Driver installed.

We have a list of companies in our database, some of which have an apostrophe in them. However, if someone types a company name containing an apostrophe on a company search webpage i get the error

java.sql.SQLException: ORA-00911: invalid character

So how would i query the database for a name which contains an apostrophe. The apostrophe in the database is written as ' and not any special characters etc.

What do i do?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 14 2004
Added on Jun 16 2004
6 comments
689 views