I'm attempting to put an image into a BLOB field.  I'm using Visual Basic 6
with ADO, although I wouldn't think that's making a difference.

I create a string that contains the binary representation of the file.  At
this point the string is 5064 characters long.  I call mysql_escape_string
and the string becomes 5350 characters long.  That seems normal as there
will be a lot of characters in the binary data that need to be escaped.

After selecting it out of the database, the size of the data retrieved is
5023 bytes.  Clearly this is a problem when trying to re-create the file.

Any suggestions as to why?  Is there a function other than
mysql_escape_string that should be used with binary data?  Do I have to
write my own?  If so, what bytes need to be escaped?  I assumed just NULL,
"'", "\" and """...but didn't bother writing one since mysql_escape_string
seemed to do what I wanted.

Thanks,

Eric


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to