我找到一个资料,参考: 在pb中的处理 string ls_path,ls_filename,ls_jhdh long ll_num,ll_count,rtn blob ole_blob ll_num=dw_lb.getrow() if ll_num>0 then ls_jhdh=dw_lb.object.ct_njhdh[ll_num] select count(*) into :ll_count from sj_jh_jhfjb where ct_jhdlxbh='1' and ct_jhdh=:ls_jhdh and ct_jdlxbh=:is_jdlx; if ll_count>0 then rtn=messagebox("提示","是否要修改此附件",question!,yesno!,1) if rtn=1 then SELECT BLOB ct_jhfjnr INTO le_blob from sj_jh_jhfjb where ct_jhdlxbh='1' and ct_jhdh=:ls_jhdh and ct_jdlxbh=:is_jdlx; ole_1.objectdata =ole_blob If ole_1.activate(offsite!) <> 0 Then Messagebox("OLE Activate","不能激活") Return -1 end If end if else messagebox("提示","没有附件") end if end if
在pb中的处理 string ls_path,ls_filename,ls_jhdh
long ll_num,ll_count,rtn
blob ole_blob
ll_num=dw_lb.getrow()
if ll_num>0 then ls_jhdh=dw_lb.object.ct_njhdh[ll_num]
select count(*) into :ll_count from sj_jh_jhfjb where ct_jhdlxbh='1' and ct_jhdh=:ls_jhdh and ct_jdlxbh=:is_jdlx;
if ll_count>0 then
rtn=messagebox("提示","是否要修改此附件",question!,yesno!,1)
if rtn=1 then
SELECT BLOB ct_jhfjnr INTO le_blob from sj_jh_jhfjb where ct_jhdlxbh='1' and ct_jhdh=:ls_jhdh and ct_jdlxbh=:is_jdlx;
ole_1.objectdata =ole_blob
If ole_1.activate(offsite!) <> 0 Then
Messagebox("OLE Activate","不能激活")
Return -1
end If
end if
else
messagebox("提示","没有附件")
end if
end if
我出现错误的原因是驱动的问题。在PB6.5下使用O73 ORACLE 7.3驱动连接数据库就是不行,但用8就可以。具体原因我还没有搞清楚,可能是O73 ORACLE 7.3的驱动不认BLOB,CLOB等类型吧,对于O73 ORACLE 7.3,BLOB,CLOB,BFILE等类型毕竟是个新类型,哈哈。
马上结贴。