Subject retrieving a blob field
Author pchaisty
Hi

I have an app where I wish to retrieve a text blob from a Firebird db.

I have successfully written the blob with

Var
Storage : TMemoryStream;

begin
try
// save chart to stream
Storage := TMemoryStream.Create;
SaveChartToStream(TemplateChart,Storage,false,true);
// now copy to db blob field
IB_Query_Templates.FieldByName('TEMPLATE').Assign(Storage);

finally
Storage.Free;

end;


end;


I can't seem to work out how to do the opposite to load it back into
the storage stream, so far I have the following



Var
TemplateChart : TChart;
Storage : TMemoryStream;


begin
try
Storage := TMemoryStream.create;
TemplateChart.Free;
TemplateChart := TChart.Create(Self);

// Storage should be loaded here with the blobfield

LoadChartFromStream( TCustomChart( TemplateChart ),storage);
TeeCommander1.Panel := TemplateChart;
TemplateChart.Parent := PanelBox;

Finally
Storage.Free;

end;
end;


Can anyone offer any help ?

Rgds

Peter