显示:
var
MS: TMemoryStream;
begin
MS := TMemoryStream.Create;
try
Query1Images.SaveToStream(MS);
Image1.Picture.Bitmap.LoadFromStream(MS);
finally
MS.Free;
end;
保存:
var
MS: TMemoryStream;
begin
MS := TMemoryStream.Create;
try
Image1.Picture.Bitmap.SaveToStream(MS);
query1.edit;
Query1Images.LoadFromStream(MS);
query1.post;
finally
MS.Free;
end;
end;