It looks like you are using the Statement object to do your inserts instead of the 
PreparedStatement.

You can either use the PreparedStatement or

Make sure you are using single quotes around your character data.

For Example:

Insert into table values('or','and','anyOtherReservedSQLKeyword');

Hope this helps,
Abraham Kang

-----Original Message-----
From:   Jose Luis Diaz [SMTP:[EMAIL PROTECTED]]
Sent:   Wednesday, November 17, 1999 8:04 AM
To:     [EMAIL PROTECTED]
Subject:        OFF-TOPIC: Problems with Form in JSP

I have a problem when the forms in JSP, really the problem is with SQL, when I try to 
INSERT the data of a form with an SQL statement in a JSP, if the data contains " or ' 
the result is incorrect.

I could parse ALL the insert I have done but I find it tedious, Is there any solution 
to the INSERT problem with " or ' in Java, JSP or SQL.

Thanks.


 << File: ATT00005.html >>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to