Subject | Blob problems |
---|---|
Author | irogla |
Post date | 2008-01-30T23:18:45Z |
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 looks like
this for reading my images from database:
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?
// Johan
with images I store in blobs. My code which I used with IBX looks like
this for reading my images from database:
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?
// Johan