If you are using Oracle, just change your 'O'Reilly'
to 'O''Reily' by program, then you can success.
Jennifer Feeney wrote:
> Hi all,
>
> Once again, thanks to anyone that can offer any help or advise on
> this one!
>
> I have found a bug in my servlet......
>
> Description:
> ========================================================
> I have a servlet developed that allows users to register for
> a service, it all works great, except for one thing, if a person
> enters a Surname of the O'Rourke, O'Reilly, type I get the following
> message........
>
> java.sql>SQLException:Syntax Error(Missing Operator) in expression
> Query.
>
> I know what causes the error, its the " ' " character that messes
> up my InsertIntoDB query......
>
> The code snippet below is what I am using, can anyone tell me how i
> could modify it to allow surnames of this type to be accepted and not
> generate an error.
>
> Code Snippet:
> ================================================================
>
> boolean success = insertIntoDB(
> "'" + email + "','" + firstName + "','" + lastName + "','" +
> telNo + "','" + address1 + "','" + address2 +
> "','" + county + "','" + country + "','" +
> (String.valueOf(IdNo)) + "','" + password + "'");
> ================================================================
> End Code:
>
> Ps I tried the archives, but the server is down.....
>
> Thanks again to anyone that may be able to help.
>
> Regards,
> Jennifer
>
> _____________________________________
>
> Get your free E-mail at http://www.ireland.com
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
- Servlet Bug!! Jennifer Feeney
- Re: Servlet Bug!! Huimin Wang
- Re: Servlet Bug!! Martin Cooper
- Re: Servlet Bug!! Danny Rubis
- Re: Servlet Bug!! Artigas, Ricardo Y.
- JSP -2- JSP -2- JSP : Navigation Issue Gurudev Devanla
- Re: Servlet Bug!! R.Gurumoorthy
- Re: Servlet Bug!! sharma Sumeet
- Re: Servlet Bug!! R.Gurumoorthy
