Try using a prepared statement... I've gotten this to work with the majority
of symbols.

-----Original Message-----
From: Gavin Meehan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 11:25 AM
To: [EMAIL PROTECTED]
Subject: Writing quotes to a DB


Hi

I have form based application that uses JSP, and a MySQL DB. My problem is
that when i enter a quote in one of the form fields the SQL insert query
will fail.

  eg inserting the Damien O' Dowd will fall over because of the single quote
after the O. I know this can eaisly be sorted in Perl using the DBI quote
function, is there any such method in Java ???

Thanks Damien


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to