exception when others then rollback to A;你上面过程出错了,跳到异常处理时,没有关闭游标。。
谢谢各位的答复,但是好象都不能解决问题呀。我现在做了一个最简单的测试,存储过程如下:create or replace procedure cj_test is temp_lbillcode varchar2(20):=''; cursor cur_Orders is select lbillcode from orders ;
begin open cur_Orders; fetch cur_Orders into temp_lbillcode; while cur_Orders%found loop fetch cur_Orders into temp_lbillcode; end loop; close cur_Orders; end cj_test;即使如此简单的代码,也会有未关闭的游标啊。 这是为什么?
cursor cur_Orders is select lbillcode from orders ;
begin open cur_Orders;
fetch cur_Orders into temp_lbillcode;
while cur_Orders%found loop
fetch cur_Orders into temp_lbillcode;
end loop; close cur_Orders;
end cj_test;即使如此简单的代码,也会有未关闭的游标啊。
这是为什么?