Subject | Re: [IBO] Blob problems |
---|---|
Author | irogla |
Post date | 2008-01-31T13:35:40Z |
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
frmA.imgA.Picture.Assign(TBlobField(DM.qryRead.FieldByName('HEADER')));
frmA (TForm)
imgA (TImage)
qryRead (TIB_Query)
HEADER is a blob
I tried with this:
frmA.imgA.Picture.Assign(DM.qryRead.CreateBlobStream(DM.qryRead.FieldByName('HEADER'),
bmRead)));
But I got incompatible types error: TIB_BlobStreamMode and
TBlobStreamMode.
// Johan
>looks like
> At 12:08 PM 31/01/2008, you wrote:
> >--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@> wrote:
> >>
> >> At 10:18 AM 31/01/2008, you wrote:
> >> >Hi, I just converted from IB/IBX to FB/IBO and are having problems
> >> >with images I store in blobs. My code which I used with IBX
> >> >this for reading my images from database:Help.
> >> >
> >> >Stream: TMemoryStream;
> >> >...
> >> >imgA := TImage.Create(frmA.pnlA);
> >> >Picture.Assign(TBlobField(DM.qryRead.FieldByName('HEADER')));
> >> >
> >> >And like this for saving:
> >> >
> >> >Stream_HEADER := TMemoryStream.Create;
> >> >frmA.imgA.Picture.BitMap.SaveToStream(Stream_HEADER);
> >> >...
> >> >DM.qryWrite.ParamByName('HEADER').Assign(Stream_HEADER)
> >> >
> >> >Anyone got a clue how to change my code?
> >>
> >> What class is your qryWrite statement object?
> >>
> >> Helen
> >>
> >
> >Before when I used IBX it was TIBQuery, now when I use IBO it is
> >TIB_Query.
>
> That makes it simple. :-) Lookup the CreateBlobStream method in the
>So how do I change this line?
> Helen
>
frmA.imgA.Picture.Assign(TBlobField(DM.qryRead.FieldByName('HEADER')));
frmA (TForm)
imgA (TImage)
qryRead (TIB_Query)
HEADER is a blob
I tried with this:
frmA.imgA.Picture.Assign(DM.qryRead.CreateBlobStream(DM.qryRead.FieldByName('HEADER'),
bmRead)));
But I got incompatible types error: TIB_BlobStreamMode and
TBlobStreamMode.
// Johan