You can also use the connection's meta data - there is a method to
get the escape character (and I believe another method to get the list of
characters that need escaping).

        Randy

> -----Original Message-----
> From: William Kaufman [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 16, 2001 10:13 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: jdbc
> 
> 
> (You know, this has nothing at all to do with Tomcat, or even 
> servlets,...)
> 
> Use a PreparedStatement, and call setString().
> 
>                                         -- Bill K. 
> 
> > -----Original Message-----
> > From: Andrea Mari [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, July 16, 2001 6:58 AM
> > To: [EMAIL PROTECTED]
> > Subject: jdbc
> > 
> > 
> > Hi,
> > 
> > how can I escape automatically the query strinng when it 
> > contains invalid
> > character as ' or \ ?
> > 
> > I know that in php there is a directive that do it.
> > 
> > Can you help me?
> > 
> > Andrea
> > 
> 

Reply via email to