I simply do not want to hard code this into the sql and most
definitely do not want to do this manually :)
For example, suppose you have a input text box that takes the last name
and someone enters - O'Mannon - as the last name. What I would want is
something along these lines.
start psuedocode....
user enters lastname in txtbox
strLname = get last name from txtbox
strLastName = replace (strLname,', '')
Sql insert strLastName
end psuedocode
What I am looking to find is if there is a replace fucntion that I can use
in JSP that will do this for me.
Anil
On Fri, 2 Feb 2001, Artigas, Ricardo Y. wrote:
> I think it should be insert into tablename(field1) values(value1,'ab''c');
>
> :^)
> Ricky Y. Artigas
> Analyst/Programmer
> Information Technology Division
> Easycall Communications Phils., Inc.
> - Easycall Internet -
> 418 Arayat St., Mandaluyong City 1550, Philippines
> Personal WAP Site: http://www.buzzed.co.uk/mobile/?rya
> Company Website: http://www.easycall.com.ph
> Tel.no: (+632) 5338001 ext.6574
> Mobile:(+63) 0917-8951783
> Pager: 141-002955
> Email: [EMAIL PROTECTED]
>
>
> > -------------------------------
> > IMPORTANT NOTICE:
>
> > This message (and any attachment hereto) may contain privileged and/or
> > confidential information specific to EasyCall. If you are not the intended
> > addressee indicated in this message, you may not copy or disseminate this
> > message (or any attachment hereto) to anyone. Instead, please destroy this
> > message (and any attachment hereto), and kindly notify the sender by reply
> > email. Any information in this message (and any attachment thereto) that
> > do not relate to the official business of EasyCall shall be understood as
> > neither given nor endorsed by the company.
> >
> >
> > -----Original Message-----
> > From: Chitra Muthukrishnan [SMTP:[EMAIL PROTECTED]]
> > Sent: Friday, February 02, 2001 2:14 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Escaping ' in a SQL INSERT
> >
> > 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
>
> ===========================================================================
> 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