如何存取图片
在PB中我用一段程序来实现图片的存取时,图片却存不进去。
脚本如下:
int fh
blob emp
fh=FileOpen("g:\test\net.bmp",StreamMode!)
if fh<>-1 then
FileRead(fh,emp)
FileClose(fh)
updateblob users set photo=:emp where name="xiaofei" using sqlca;
end if
if sqlca.sqlnrows>0 then
commit using sqlca;
end if
当我再去查询数据库时发现根本没有把图片存进去。对了我使用的数据库是SQL
SERVER 表users中 photo字段使用的是image数据类型