single quotes problem

I am building a sql query based on user input and the field value from the database contains single quotes e.g., Baccharis 'Centennial'

The application/query fails on this request because of the single quotes in the name.

How can i escape <whatever> the value in the java code to allow single quotes

Running Oracle 9i and java 1.4

Thanks

[376 byte] By [farmboy] at [2007-11-26 8:02:05]
# 1
Using java script replace all the single quotes with ` (which is an accented character which is usually above tab key)Insert the record into the database. This will not conflict with the Oracle query parser.While displaying it back on UI, replace ` with '
genius20_2001 at 2007-7-6 20:34:19 > top of Java-index,Development Tools,Solaris and Linux Development Tools...