存入table: 其中pic为blobfield
var Stream: TBlobStream;
begin
Table1.Append;
Stream:=TBlobStream.Create(table1pic, bmWrite);
Image1.Picture.Graphic.SaveToStream(Stream);
Table1.Post;
Stream.Free;
end;
读出:
var Stream: TStream;
begin
JpegFace:=TJPEGImage.Create;
Stream:=Table1.CreateBlobStream(Table1Pic,bmRead);
JpegFace.LoadFromStream(Stream);
Image1.Picture.Graphic:=JpegFace;
Stream.Free;
JpegFace.Free;
end;