Subject Re: [IBO] IBO Blob usage
Author Helen Borrie
At 03:01 PM 18/11/2004 +0200, you wrote:

>Hi guys,
>I've used IBO almost 4 years ago and started a new project which is the
>perfect candidate for using my beloved IBO and Firebird again.
>The project consists of a Windows client app, a Windows service and
>Firebird. The Windows service reads information from a hardware unit and
>then stores various data into a database. Some of this data is binary and
>needs to be stored in blob fields.
>The service has no visual Windows interface and I'm currently only using the
>TIB_Connection, TIB_Transaction and TIB_Query IBO components to insert data
>into the database. The TIB_Query component I use as a generic SQL component
>and pass it the SQL statement based on what I need to do or what data I need
>to store. In this case I usually only INSERT new records. Which is the
>easiest way for me to get binary data into a blob field using the same
>"generic" query structure?
>I hope my question makes sense. Any help or examples would be greatly

Pass the contents of the device file into a TStream derivative, then assign
the stream to the blob. There are examples in the IBO help under
CreateBlobStream().You can do it the other way around, too, if you want to
save the blob data to a file.