首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

执行这个存储过程,SQLCA.SQLCODE=100解决办法

2012-04-23 
执行这个存储过程,SQLCA.SQLCODE100有三个表分别是a,b,cCREATE procedure del_a_b_c@ls_temgh varchar(3)

执行这个存储过程,SQLCA.SQLCODE=100
有三个表分别是a,b,c

CREATE procedure del_a_b_c

@ls_temgh varchar(3)

as 

begin
   
  delete from a where gh = @ls_temgh
  delete from b where gh = @ls_temgh
  delete from c where gh = @ls_temgh

end
GO
ls_gh = dw_1.getitemstring(ll_row , 'gh')
declare sp_del_a_b_c procedure for del_a_b_c
  @ls_temgh = :ls_gh ;
  execute sp_del_a_b_c;
if sqlca.sqlcode = 0 then
commit;
else
messagebox('' , sqlca.sqlcode)
rollback;
end if

结果sqlca.sqlcode返回值为100,请问哪里有问题呢?

[解决办法]
对的
if sqlca.sqlcode0 or sqlca.sqlcode=100 then
commit;
else
rollback;
end if
[解决办法]
此處sqlcode值只表示是否成功執行此存儲過程,并不代表存儲過程內部已成功執行刪除動作。

热点排行
Bad Request.