Subject | Re: [IBO] Re: READING AND WRITING BLOBS |
---|---|
Author | Thomas Steinmaurer |
Post date | 2008-11-21T12:20:44Z |
>> I have a Firebird 1.5.4 dialect 3 database ,mounted on a Visat PC,SUB_TYPE 0
>> running Firebird 2.1, with binary information stored as BLOB
> SUBTYPE 2
>> SEGMENT SIZE 4096 (from Ibexperts), I am using Delphi 2007, and
> using
>> the ODBC connection (2.00.00.144) and the ADOdataset i can
> successfully
>> stream the blob to a file (test.jpg) this work perfectly !
>>
>> But using the IBO Tdataset components TIBOQuery or TIBOTable the
> output
>> is truncated. I am using IBO version 4.8.7
>>
>> How can i use my favorite Dataset components (IBO) to read these
> blobs.
>> Regards
>> Colin Coleman
>>
> 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 ?
> We only use the TIBOdataset components, Can i use the TIBOQuery toTIB_JPEGImage needs to get attached to TIB_DataSource, so yes, it's a
> read/write these Blobs ? and if so how.
>
> you mentioned TIB_JPEGImage would this mean i would have to rewrite
> my whole application to use the TIB_ components ?
TIB_ based component, but as Helen has mentioned, you could try to
attach the component to a TIBO* based component via the InternalDataset
property. I haven't tried that though.
AFAIK, the JVCL component set has a TJvDBImage component, which also
supports JPEG. Look here:
http://shenoyatwork.blogspot.com/2005/01/tdbimage-and-jpeg-files.html
TImage is able to display a JPEG, if the jpeg unit is in the uses
clause. If it is a one-time thingy, then you could grep the source of
the methods InternalLoadPicture and InternalUpdateData in
IB_JPEGImage.pas and adjust a bit for your need.
HTH.
--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com
My blog:
http://blog.upscene.com/thomas/