Hi Kamlesh
Are you building the query string for jdbc Statement Object?. Going by
your question I guess you are building a static SQL query and if the value
with in WHERE condition has special characters, it gives problem. I think
you can try using PreparedStatement instead of Statement. If you use
setString() method of PreparedStatement, even if the value with in the
string contains special chars Java will take care of encoding it with escape
characters.
Hope this solves your problem
---
Prasanna
----- Original Message -----
From: "k a m l e s h" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 07, 2002 1:35 PM
Subject: JBBC sql statement problem
> Hi all,
> i have problem while sending query to database if somehow the data filled
> in by user in the html form contains words of type hon's as ( ' ) is
> delimiter for any char value and sql takes it as delimiter and it creates
> problem , please if somebody knows how to solve this do help me
>
> Regards
> kamlesh
> PS: i want to insert the string in database as it is.
>
> +-------------0000ooo()ooo0000--------------+
> | |
> | Kamlesh Kr. Sharma Dept. CSA |
> | IISc Bangalore-12 |
> | Http://www2.csa.iisc.ernet.in/~kamlesh |
> | Contact Hostel 80-3092453 Room No. M-111 |
> | Contact Dept. 80-3092368. Ext 102 or 115 |
> +-------------------------------------------+
>
>
___________________________________________________________________________
> 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