ymslx-2007
update......where current of...
foreach cur001 for
select mkno_start_val, mkno_max_val, mkno_now_val
into w_start_num , w_max_num , w_current_num
from hulft_dt_f_mkno
where hulft_id = p_hulft_id
if w_max_num < w_current_num then
let w_current_num = w_start_num;
update hulft_dt_f_mkno
set mkno_now_val = w_current_num,
upd_date_time = w_time
where current of cur001;
end if
exit foreach;
end foreach;
以上代码编译没问题,可就是执行时回出-255的错。
希望高手指教!谢谢
liaosnet
-255 Not in transaction.
The database server cannot execute this COMMIT WORK or ROLLBACK WORK
statement because no BEGIN WORK was executed to start a transaction.
Because no transaction was started, you cannot end one. Any database
modifications that were made are now permanent; they cannot be rolled
back but do not need to be committed. Review the sequence of SQL
statements to see where the transaction should have started.
This error can occur when you open a cursor for update and have not started
a transaction yet.