执行这个存储过程,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值只表示是否成功執行此存儲過程,并不代表存儲過程內部已成功執行刪除動作。