Subject [IBO], LoadFromStream
Author Gernot Dittrich
Hello

I have tried to use 'LoadFromStream' to get my blobs into the database
but its not working. It compiles ok but it throws an access violation in
VclDb50
(Reading of adress 0000000)in the last line of the try-block.
There is no difference wether I declare 'stream' as TStream or
TIB_BlobStream.

Here is the code:

procedure TForm1.ButtonCREATEClick(Sender: TObject);
begin
OleContainer1.InsertObjectDialog;
end;

procedure TForm1.ButtonSAVEClick(Sender: TObject);
var
stream : TIB_BlobStream;
column : TIB_Column;
begin
try
column := TIB_Column(IB_Query1.FieldByName(EditBLOB.Text));
stream := IB_Query1.CreateBlobStream(column,bsmWrite);
OleContainer1.SaveToStream (stream);
TBlobField(column).LoadFromStream(stream);
finally
stream.free;
column.free;
end;
end;

Can anyone help ?

Gernot Dittrich
gdi@...