Delphi unigui从数据表里下载流文件


本文整理自网络,侵删。

 
引用
Data.DB, uniGUIapplication

//从数据表里下载流文件
class function Tcommont.downfujian(fjbh, fjnm: string): boolean;
var
  sql: string;
  fs: TMemoryStream;
begin

  fs := TMemoryStream.Create;
  sql := 'select fileid,file from tbfile where fileid=' + QuotedStr(fjbh);
  UniMainModule.tbfile_q.Active := false;
  UniMainModule.tbfile_q.SQL.Text := sql;
  UniMainModule.tbfile_q.Active := true;

  try
    TBlobField(UniMainModule.tbfile_q.FieldByName('file')).SaveToStream(fs);
    UniSession.SendStream(fs, fjnm); //保存文件名fjnm
  except
  end;

  fs.Free;
  UniMainModule.tbfile_q.Active := false;

end;
――――――――――――――――

原文链接:https://blog.csdn.net/ozhy111/article/details/83339620

相关阅读 >>

Delphi新的变量的声明方法

Delphi 中的文件系统进行unicode标准化

Delphi屏蔽alt+tab键代码

Delphi xe5 android得到手机的手机号码

Delphi直接插入法排序示例

Delphi 关于虚拟的desktop的编程

Delphi webbrowser 无法调用当前浏览器的版本

Delphi让listbox实现即指即显功能

Delphi console程序中一种定时方法

Delphi中使用tpathanimation

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...