procedure TForm1.Button2Click(Sender: TObject); var MS:tmemorystream; begin if image1.picture.Graphic <> nil then begin MS := tmemorystream.Create ; try image1.Picture.Graphic.SaveToStream(MS); MS.Position :=0; adotable1.Edit ; tblobfield(adotable1.FieldByName('myimage')).LoadFromStream(MS); finally MS.Free ; end; end; end;
var
MS:tmemorystream;
begin
if image1.picture.Graphic <> nil then
begin
MS := tmemorystream.Create ;
try
image1.Picture.Graphic.SaveToStream(MS);
MS.Position :=0;
adotable1.Edit ;
tblobfield(adotable1.FieldByName('myimage')).LoadFromStream(MS);
finally
MS.Free ;
end;
end;
end;
这个是个数据库,但不是ACCESS结构的