Subject | Re: [IBO] TBlobfields in TIBOQuery |
---|---|
Author | Harald Klomann |
Post date | 2001-03-12T08:26:54Z |
Dieter,
You need to use the method from the TDataset class instead of using the
TBlobStream class directly.
MyIBODataset.CreateBlobStream( ) will do it for you. Just treat what it
returns to you as a TStream class.
tremel@... wrote:
You need to use the method from the TDataset class instead of using the
TBlobStream class directly.
MyIBODataset.CreateBlobStream( ) will do it for you. Just treat what it
returns to you as a TStream class.
tremel@... wrote:
> Hi,
>
> I want to Fill a TBitmap from a Blobfield using a TIBOQuery. With a
> TIB_Query I could do it well with Field[2].AssignTo(myBitmap). But
> with TIBOQuery I get a TField, not a TIB_Column.
> When using the conventional Methods like
>
> function GetBitmapfromBlobField(fld: TBlobField): TBitmap;
> var
> BlobStream: TBlobStream;
> begin
> BlobStream := TBlobStream.Create(fld, bmRead);
> with BlobStream do
> try
> Seek(0, soFromBeginning); {Seek to the Begginning of the stream}
> Result := TBitmap.Create;
> Result.LoadFromStream(Blobstream);
> finally
> Free;
> end;
> end;
>
> TBlobStream.Create shows an Error 'wrong Field Type'
> Any Idea?
>
> Thanks Dieter Tremel
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/