List:MySQL and Java« Previous MessageNext Message »
From:Kazys Jocionis Date:August 3 1999 2:17pm
Subject:Re: SQL escape what to do with }
View as plain text  
thank you for a prompt responce.

I was thinking there is something like a function quote() in DBI.
Well.
Its OK with ' escaping like \' or ''
also with \ escaping like \\

but there is a another problem with        }
lets say
" select * from agents where password= '}' "
if we escape it like a 
" select * from agents where password= '\}' "
we get an error.

with mySQL such a query is OK but seems Java is frustrated with \}

any thoughts?

Thank you again.

Kazys





----- Original Message ----- 
From: Jan Fedak <J.Fedak@stripped>
To: <java@stripped>
Sent: Tuesday, August 03, 1999 2:34 PM
Subject: Re: SQL escape


> Try 'd''artanjan' or "d'artanjan".
> 
> Jan
> 
> Kazys Jocionis wrote:
> >Hello,
> >
> >could someone point me to the right way to escape SQL characters like '
> >using JDBC please.
> >I mean queries like "SELECT id FROM friends WHERE name = 'd'artanjan'  "
> >
> >
> >thank you in advance
> >
> >Kazys
> 
> -- 
>   Jan Fedak                                        +420 603 304 648
>   mailto:J.Fedak@stripped            talk:jack@stripped
>   mailto:jack@stripped
>                 Linux - the ultimate NT Service Pack.  
> 
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail java-thread250@stripped
> 
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail java-unsubscribe@stripped instead.
> 

Thread
what are "stored procedures"fractals3 Aug
  • SQL escapeKazys Jocionis3 Aug
    • Re: SQL escapeJan Fedak3 Aug
    • Re: SQL escapeC Javier Castro Pena3 Aug
      • Re: SQL escapeChristian Mack3 Aug
  • Re: SQL escape what to do with }Kazys Jocionis3 Aug
  • Re: SQL escape } sorry figured it outKazys Jocionis3 Aug
  • Re: what are "stored procedures"Cris Perdue3 Aug