I have a form with textboxes. I take the user values with request.getparameter() in a jsp. I want to insert these string values into a table on db2. One of the strings has an apostrophe contained in it.
"INSERT INTO Store VALUES" +
"(1, 'Macy's Store', 'Palo Alto', 'CA')";
I get an error with insertion, because 'Macy's Store' contains an apostrophe and the insert expects a comma after 'Macy' and so the error message shows that the number of the values to be inserted is more than the number of columns actually contained.
Can anyone help me how to solve this problem?