Subject Re: [IBO] Re: READING AND WRITING BLOBS
Author Helen Borrie
At 10:04 PM 21/11/2008, you wrote:
>--- In IBObjects@yahoogroups.com, "colincoleman2002"
><yahoogroups@...> wrote:
>
>Hi Helen,
>You are spot on !!, we are very simply trying to store jpegs in the
>Firebird 2.1 DB and then display them in a Delphi 2007 form. What
>BLOB type would you reccomend using for this type of storage ?

Just a binary blob. Sub_type 0. But you can use any negative sub_type number if you have a special reason to want to distinguish jpegs from other sorts of binary blob. All *positive* sub_type numbers are taken by the system and have special properties. Sub_type 1 you know about (text) - other pos. numbered sub_types have their own properties defined by the system and they are used by the system for various metadata usages.

>We only use the TIBOdataset components, Can i use the TIBOQuery to
>read/write these Blobs ? and if so how.

TIBOQuery is sub-classed from TDataset so just apply the same methods and props that TQuery and TTable use for blob columns. (I could look up the Delphi help for you but I think you can read. ;-) )

>you mentioned TIB_JPEGImage would this mean i would have to rewrite
>my whole application to use the TIB_ components ?

I don't know whether there is anything preventing you from using TIB_JPEGImage with a TBlobField...but, if you find it doesn't work, then try accessing the IB_ColumnBlob directly through the InternalDataset.MyBlobColumn. With a bit of luck, Thomas Steinmaurer, who wrote this component, will see your question and you'll get an answer straight from the horse's mouth.

Helen