Re: odbc functions - not binary safe?
| From: | Anthony | Date: | Tue, 27 Jan 2004 19:24:48 +0000 |
| Subject: | Re: odbc functions - not binary safe? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175966@lists.php.net to get a copy of this message | ||
If you're connecting to the mySQL database through ODBC (why not just
connect directly to mySQL server?) ... then you probably have to escape with
a single quote. For most ODBC drivers you escape ' with '' (two single
quotes) ..... took me a while to figure that one out, but works for me. :)
- Anthony
"C C" <coder9341@yahoo.com> wrote in message
news:20040126204748.92458.qmail@web20728.mail.yahoo.com...
> Hi,
>
> I'm trying to insert binary data into a MS SQL Server
> database. Text files are added fine, but binary files
> with null bytes are not. The field I'm adding the
> binary data to is image type. I get an error about
> unclosed quotation marks at the null byte, but I've
> replaced ' with ''.
>
> I tried escaping the null byte with a backslach, but
> it just changes it to the string "\0" when I download
> it.
>
> Anyone have any ideas about this?
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free web site building tool. Try it!
> http://webhosting.yahoo.com/ps/sb/