Subject RE: [IBO] TBlobField-usage in IBO
Author Jason Wharton
Glenn,

> I use Delphi 6, here is the snippet where the error occurs (Invalid
> Type Cast):
>
> Try
> MemoStream:=TBlobStream.Create(TBlobField(FieldByName('GRAPH')
> ),bmRead);
> MergeBitMap.LoadFromStream(MemoStream);
> PutImage(FieldByName('TAND').AsInteger,InColor); {image on canvas}
> Except
> On E:Exception Do
> ShowMessage(E.Message);
> End;
>
> How do I convert this to IBO, I have tried TIBOBlobStream but that
> does not seem to be published (I have checked TIBODataSet.pas and
> there is a TIBOBlobStream-class but not published) ?

Use the TDataset.CreateBlobStream() method of the dataset and you will get
an appropriate instance created for you.

Don't access the TBlobStream class directly.

Hope this helps,
Jason Wharton