Subject Re: [IBO] BLOBS to Stream's with IBO
Author Jason Wharton
That's great. May I recommend that you use TStream instead of
TIB_BlobStream? I think it is nice to keep things like that more at the
generic level.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Chris Hulsey" <chulsey@...>
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, March 21, 2001 4:59 PM
Subject: Re: [IBO] BLOBS to Stream's with IBO


> Thanks Jason for your quick response as always. I already converted to
the
> following code with your TIB_BlobStream class and it works great!!!!!
Heres
> the Code!!!
>
>
> // Load the Picture from the Database
> void __fastcall TForm1::LoadClientPicture(TImage *ClientPicture)
> {
> TJPEGImage *Jpg = new TJPEGImage();
> TIB_BlobStream *S;
>
> S =
>
Query_ClientInformation->CreateBlobStream(Query_ClientInformation->FieldByNa
> me("PICTURE"), bsmRead);
> try
> {
> if (S->Size > 0)
> {
> Jpg->LoadFromStream(S);
> ClientPicture->Picture->Assign(Jpg);
> }
> else
>
ClientPicture->Picture->LoadFromFile("C:\\Pictures\\BLANKPICTURE.JPG");
> }
> __finally
> {
> delete Jpg;
> delete S;
> }
> }
>
> Chris Hulsey
> Visible Changes, Inc.
> chulsey@...