Hi,

I have had a similar problem...

This also occurs with ' or ".

in any field you expect this character use:

REPLACE("c:\mysql\test","\","/")
Returns the string str with all all occurrences of the string from_str
replaced by the string to_str:
mysql> select REPLACE('www.mysql.com', 'w', 'Ww');
        -> 'WwWwWw.mysql.com'

to change '\' to '/'

Rich

-----Original Message-----
From: Joerg Geistmann [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 02, 2002 1:59 PM
To: Mysql-De; MySQL Win32; MySQL Plusplus
Cc: Lazy Fox
Subject: RE: backslash about MySQL++/Microsoft Visual C++ 6.0 (2)


hello again!

sorry, i know that i must use dopple backslash in c++ ;-)
my problem is really to get backslash in database about
mysql++/vc (1.7.1)
also i try

> Query << "insert into blafasel values ('1', 'c:\\mysql\\test', '0')";

i doesn´t work!

a hint?

if i do it manual about the console and i use ' in values
it doesnt work too! if i use " it works !!!
any idea?

@Darin:
> Use the API function mysql_escape_string to prepare the value for
insertion.
how can i use it? for the complette string or only for the backslash
character?

thanks,
jörg


>
> hello there? :-)
>
> in which way can i handle backslashes in mysql++/vc?
>
> if i make a insert command like:
>
> Query << "insert into blafasel values ('1', 'c:\mysql\test', '0')";
> in c++
>
> i get no backslash in db!
>
> if i do it manual about the console it works and i have a
> backslash in the db!
>
> somebody any idea?
>
> thanks,
> jörg
>
>
>
>
>
>
> ---------------------------------------------------------------------
> Please check
"http://www.mysql.com/Manual_chapter/manual_toc.html"; before
posting. To request this thread, e-mail [EMAIL PROTECTED]

To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail [EMAIL PROTECTED] instead.


---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html"; before
posting. To request this thread, e-mail [EMAIL PROTECTED]

To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail [EMAIL PROTECTED] instead.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to