各位大哥:如何把一个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 好象有点问题 delphi 利用 调用 outlook 发邮件 已成功,但是。。。 感谢byzx,请进,给分 防治病毒文件,急啊。。。。。。。。。。 如何判断当前硬盘是IDE硬盘还是SCSI硬盘,并获得磁盘序列号(在线等待)? 能向Web Service提交超过1MB的数据吗?在线等候 为什么帮助文挡老是提示错误! 怎样把自己的图标加到IE的工具栏里面 delphi7怎样关闭另一个应用程序(两个独立的应用程序)?? 请问怎样锁定一个窗口的大小,使不能拉伸和缩小? 窗体的问题 如何才能提高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;
好象有点问题