图片如上即可,其他文件可以如下参考:
procedure TfmBlob.btnSaveClick(Sender: TObject);
var
FStream: TFileStream;
BStream: TBlobStream;
begin
if not OpenDialog1.Execute then exit;
FStream := TFileStream.Create(OpenDialog1.FileName,fmOpenRead);
Table1.Edit;
BStream := TBlobStream.Create(Table1Doc,bmReadwrite);
with BStream do begin
Seek(0,soFromBeginning);
Truncate;
CopyFrom(FStream,FStream.Size)
end;
Table1.Post;
BStream.Free;
FStream.Free;
btnReadDoc.Enabled := false;
btnReadPic.Enabled := false;
end;