in
if opendialog1.Execute then
begin
sfilename:=opendialog1.FileName;
adodataset1.Append;
adodataset1.FieldByName(''ff'').asstring:=blobcont(sfilename);
adodataset1.Post;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
sfilename:string;
bs:tadoblobstream;
begin
bs:=tadoblobstream.Create(tblobfield(adodataset1.FieldByName(''ff'')),bmread);
try
sfilename:=''c:\ff.doc'';//换成
图片格式就可以了
if fileexists(sfilename) then
deletefile(sfilename);
bs.SaveTofile(sfilename);
OleContainer1.CreateObjectFromFile(sfilename,false);
//OleContainer1.LoadFromFile(sfilename);
//OleContainer1.LoadFromStream()
//memo1.Lines.LoadFromFile(sfilename);
// WebBrowser1.Navigate(pchar(sfilename));
finally
bs.free;
end;