List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:August 19 2002 3:57am
Subject:Re: MySQL BLOB field - reliable or NOT?
View as plain text  
At 17:03 +0200 8/18/02, Bruno Batarelo wrote:
>I belive that I have a little bit bigger problem with MySQL, and for now, no
>one told
>me a solution. Problem is with BLOB fields. That type of field behaves OK if
>I use INSERT INTO statement. But the problem is that it is impossible to use
>INSERT INTO when I need to send a string full of binary characters I.E.
>picture, EXE etc. The only solution is to open that kind of file, place it
>in a variable, use ADO and with help of .AddNew mthod to write that variable
>to the database. Result: Multiple-step operation generated errors - error.
>Have You ever met this kind of problem. I have noticed that BLOB fields are
>not so attractive to work with. Are they reliable enough for work because
>whenever I try to work with this data type, I always have difficulties in
>combination with ADO, and seemingly, ADO has not got problems in work. If
>You can help me, I'd appreciate it.

You'll get the same kind of problem trying to put that kind of information
into *any* string column.  The problem isn't MySQL.  You're not constructing
the statement properly.  Any MySQL API should have some kind of method for
escaping data values like you're working with so that you can insert them
into the query string.  For DBI, you use quote() or placeholders.  For
PHP, you use addslashes().  For JDBC or Python DB-API, you use placeholders.


MySQL BLOB field - reliable or NOT?Bruno Batarelo18 Aug
  • Re: MySQL BLOB field - reliable or NOT?Benjamin Pflugmann18 Aug
  • Re: MySQL BLOB field - reliable or NOT?Paul DuBois19 Aug