java/oracle and insert statement with special characters
807598Sep 19 2006 — edited Sep 21 2006I have created a java program that take a text format and insert into Oracle database.
create table a (testfield varchar (50));
The html allow the user to enter free form text and the java program insert into the database without any more.
Now the problem, if the user enter single quote, ie: I'll testing., The program failed because it is actually doing
insert into a values ('I'm testing.'); since oracle cannot recognize the extra single quote. I need to somehow change the value to 'I''m testing.
What is the easiest format to do this? What happen if the user enter the value ('A & B company') All these special character cause my program to bomb.
I need help as how to handle special characters.
Thanks,
Maria