数据量不大
刚刚试了一下,在这样的情况也会报错
declare cur_0 cursor for
select buy_no
from all_sell
where wri_date>= :date4 and wri_date< :date1
and rtrim(fill_dept)=:fill_dept and wri_money8<>0;
open cur_0;
do
fetch cur_0 into :w_buyno;
if sqlca.sqlcode=-1 then
messagebox("警告","读数据库错误,请重试!",exclamation!)
return
end if
put_money(1)
loop until sqlca.sqlcode=100
close cur_0;
function: put_money()中还有一条select...,就在这里报错
sqlca.sqlerrtext >>connection is busing with result for another hstmt
奇怪的是,循环过程中不是每次都错,有一两次能通过
我担心是游标中循环select导致读数据库冲突,那就麻烦了