Subject RE: [IBO] IBO Blob usage
Author Don Schoeman
Thx for the quick response Helen.

I guess I'm going to have to add and configure a separate TIB_Query
specifically for the table in which I need to store the blobs. This way I
can pre-define the fields in the design-time editor and use it as you
mentioned. You see, currently I only use the single TIB_Query component
throughout the whole application and I never supply it with any fields, I
simply add an SQL statement to it's SQL property and then execute the query.

Best Regards,
Don Schoeman

-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: 18 November 2004 03:15 PM
Subject: Re: [IBO] IBO Blob usage

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