写入数据库中(例如存到数据库的是f:/aa.bmp)
var myfilestream:tfilestream;
myblob:tblobfield;
begin
adoquery1.append;
myfilestream:=tfilestream.Create('f:/aa.bmp',fmopenread);
myblob:=tblobfield(adoquery1.FieldByName('Photo'));
myblob.LoadFromStream(myfilestream);
myfilestream.Free;
try
adoquery1.Post;
except
end;
end;
读出
Image1.Picture.bitmap.assign(tblobfield(adoquery1.fieldbyname('Photo')));