Hi,

Read a blob field (containing any kind of data) from the database is easy. You have to do the same thing as in case of other field types. And if you use TBlobField field type (or dynamic typecast), this field type has a .SaveToStream (.SaveToFile) method. You can use this to save the data to anywhere.

To write a blob field in a query, you should use parameters. For example:

"insert into Table values (:BlobValue)"

Then you have to set the value of this parameter like this:

.ParamByName('BlobValue').LoadFromStream(SourceStream, ftBlob);
This methods loads the content of SourceStream to the parameter from the cursor to the end of the stream.

(you can use .LoadFromFile method the same way).

Then you can just execute the query.

Good luck,
Daniel

p.s.: You must do it the same way in case of any SQL servers.

At 07:34 2002.11.28._+0200, you wrote:
 Hi,

I would like to know how to store binary data as images, sounds,  Rich Text
Format, pdf-files, as BLOB in MySQL. (from
Delphi).

Sincerely,

Adrian Tarniceru

---------------------------------------------------------------------
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