各位大哥:如何把一个tiff文件保存到sql数据库,而且可以通过dbimage之类的控件显示出来。 如何把一个tiff文件保存到sql数据库,而且可以通过dbimage之类的控件显示出来。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 //看看下面我的代码,以前用来存其他文件的,现在不知道可以吗?procedure TForm1.Button1Click(Sender: TObject);var tempFile:TMemoryStream; strName:string;beginstrName:='xxx';//你的文件try tempFile := TMemoryStream.Create ; tempFile.LoadFromFile(strName); with adoquery1 do begin close; sql.Clear; sql.Add('insert into file1(id, afile) values(1,:FileSelf)'); parameters.ParamByName('FileSelf').LoadFromStream(tempFile, ftBlob); ExecSql; end;finally tempFile.Free;end; tempFile.LoadFromFile(strName)后面加上tempFile.Position := 0 好象有点问题 寻求个个控件。。。 VB中的GetPortVal函数,DELPHI是什么。关于判断打印机状态的函数 窗口的鼠标穿透问题 国防科大版第一次亲密接触(完整版) 找到新工作,开心,散分~~~~~~~ 怎样运用Delphi编写Windows 2000中的服务程序 谁有关于触摸屏系统软件的开发的资料? 求助解决哲学家就餐问题 如何控制EDIT控件的输入为数字 如何得到打印机的详细设置? 如何才能提高DELPHI的水平 图片位置
procedure TForm1.Button1Click(Sender: TObject);
var
tempFile:TMemoryStream;
strName:string;
begin
strName:='xxx';//你的文件
try
tempFile := TMemoryStream.Create ;
tempFile.LoadFromFile(strName);
with adoquery1 do
begin
close;
sql.Clear;
sql.Add('insert into file1(id, afile) values(1,:FileSelf)');
parameters.ParamByName('FileSelf').LoadFromStream(tempFile, ftBlob);
ExecSql;
end;
finally
tempFile.Free;
end;
好象有点问题