[Gambas-user] problem with "&" and mysql
Andreas Fröhlke
afroehlke at ...784...
Thu Feb 9 10:19:38 CET 2006
Arie Hol schrieb:
>
> On 9 Feb 2006 at 9:33, Andreas Fröhlke wrote:
>
> 8<------------ snip ----------->8
>
> Instead of using :
>
> db.exec("INSERT INTO tabTest SET textfield='Hello \\& Bye' ;")
>
> Try this :
>
> db.exec("INSERT INTO tabTest SET textfield='Hello \& Bye' ;")
>
>
> In the top example you are escaping the \ and not the &
>
> The system thinks you want to use \& as the desired characters.
>
> To escape a character only use one \
>
>
> Regards Arie
> ------------------------------------------------------------------
> For the concert of life, nobody has a program.
> ------------------------------------------------------------------
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=k&kid3432&bid#0486&dat1642
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
if I use only one "\" in gambas it raises an error:
Bad charakter constant in string
This is because gambas use the "\" itselfs as charakter to mark bad
strings. So I must use "\\&" to say gambas to send "\&" to the mysql server.
--
Mit freundlichen Grüßen aus Onsabrück.
Andreas Fröhlke
Anwendungsentwickler
KiKxxl GmbH
Mindener Str.127
49084 Osnabrück
Tel.: 0541 / 330 5 445
Fax: 0541 / 330 5 100
Mail: afroehlke at ...784...
WWW: http://www.kikxxl.de
More information about the User
mailing list