integer li_i
stirng ls_name //图片的名字,你用getfileopen函数打开的tif文件去掉.tif的名字
blob temp_pic
li_i = FileOpen(bmpname, StreamMode!)
IF li_i <> -1 then
//插入影象文件
FileRead(li_a, temp_pic)
FileClose(li_a)SQLCA.AutoCommit = true //一定要置为trueUPDATEBLOB tablename SET tif = :temp_pic
WHERE name = :ls_name;
if sqlca.sqlcode = 0 thenelse
messagebox("导入失败!","媒体数据导入失败"+sqlca.SQLErrText)
end if
SQLCA.AutoCommit = false//如果文件大的话建议对图片分段存入
stirng ls_name //图片的名字,你用getfileopen函数打开的tif文件去掉.tif的名字
blob temp_pic
li_i = FileOpen(bmpname, StreamMode!)
IF li_i <> -1 then
//插入影象文件
FileRead(li_a, temp_pic)
FileClose(li_a)SQLCA.AutoCommit = true //一定要置为trueUPDATEBLOB tablename SET tif = :temp_pic
WHERE name = :ls_name;
if sqlca.sqlcode = 0 thenelse
messagebox("导入失败!","媒体数据导入失败"+sqlca.SQLErrText)
end if
SQLCA.AutoCommit = false//如果文件大的话建议对图片分段存入
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货