Is there any special reason you can't use a PreparedStatement, since they
handle escaping for you?
>I understand that...Just don't want to do that manually :)
>
>Would rather use a replace function to to which I can feed in a string and
>tell it to do the replace as you suggest. What I am looking for is the
>existance of such a function and some code samples that people have used.
>
>Anil
>
>
>On Fri, 2 Feb 2001, Chitra Muthukrishnan wrote:
>
> > 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
> >
> >
>
>--
>_______________________________________________________________
>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
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.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