Use double single quote .
For example,
if you want to insert ab'c, your insert statement will be like this :
insert into tablename(field1) values(value1,'ab''c);
M.Chitra
www.3rdagenda.com
----- Original Message -----
From: Anil John <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 02, 2001 6:56 AM
Subject: Escaping ' in a SQL INSERT
> Greetings,
>
> I am new to JSP, so if this question has been asked and aswered before,
> please point me to the FAQ.
>
> If not, could someone provide a code sample of how you escape a ' when
> doing a SQL Insert in JSP?
>
> I am familiar with the VBScript replace function that would allow you to
> do this and am hoping that there is a corresponding JSP function.
>
> Anil
>
> --
> _______________________________________________________________
> Anil John
> [EMAIL PROTECTED] [PGP Key Available]
>
>
===========================================================================
> 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