sql Server中能否存储jpg图像文件? sql Server中能否存储jpg图像文件? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可以存 要用文件流的方式保存和读取(field as tblobfield).loadfromstream(...);(field as tblobfield).savetostream(...);or(field as tblobfield).loadfromfile(...);(field as tblobfield).savetofile(...); 可是编译的时候老是说[Error] Unit1.pas(352): Undeclared identifier: 'tBlobfield' procedure Tfilemain.BitBtn6Click(Sender: TObject);var tempjpg:tjpegimage; pic:TMemoryStream;begin tempjpg:=tjpegimage.Create; tempjpg.LoadFromFile(imagepath); pic:=TMemoryStream.Create; tempjpg.SaveToStream(pic); pic.Position:=0; if adotable1.Active=false then adotable1.Open; adotable1.append; adotable1.edit; TBlobField(adotable1.FieldByName('zwpic')).LoadFromStream(pic); adotable1.FieldByName('dah').Value:=dnum; adotable1.post; pic.Free; tempjpg.free; end; 我用的bde,怎么编译通过,就是写不进数据库,没有反应 楼主太小气,20点求这么严重的问题?加点后发消息给你的例子如何?mail 好哇,没有问题[email protected] 要使用TBlobField方法,必须先在USES中加入 “DB” 客户端使用TIdUDPServer,如何设置socket5代理来连接网络 用 Indy TIdTCP 的连接问题 数组怎样与指针相互转换?(100) DLL里封装WSDL接口的错误 关于Tupdatesql的问题 高分相送,谁知道此为什么类型的数据库 求救!!我的DELPHI出了个很怪异的毛病!!! SQL Server7中的日志文件将撑破硬盘!!! 关于一些网络游戏中的信息 如何来统计HTML文档的字数?有控件吗? dbExpress问题,SQLQuery只可处理6个字段? why 急问数据库中的中文显示出来的是乱码,在线等!
(field as tblobfield).savetostream(...);or(field as tblobfield).loadfromfile(...);
(field as tblobfield).savetofile(...);
[Error] Unit1.pas(352): Undeclared identifier: 'tBlobfield'
var
tempjpg:tjpegimage;
pic:TMemoryStream;
begin tempjpg:=tjpegimage.Create;
tempjpg.LoadFromFile(imagepath);
pic:=TMemoryStream.Create;
tempjpg.SaveToStream(pic);
pic.Position:=0;
if adotable1.Active=false then adotable1.Open;
adotable1.append;
adotable1.edit;
TBlobField(adotable1.FieldByName('zwpic')).LoadFromStream(pic);
adotable1.FieldByName('dah').Value:=dnum;
adotable1.post;
pic.Free;
tempjpg.free;
end;
加点后发消息给你的例子如何?mail
[email protected]