Forums » General Discussion

Thread: toad 5.0.0.345 error debugging stored procedure with cursor

This question is not answered. Helpful answers available: 2. Answered answers available: 1.


Permlink Replies: 0 - Pages: 1 Threads: [ Previous | Next ]
antonello.moro1_828

Posts: 1
Registered: 12/27/10
toad 5.0.0.345 error debugging stored procedure with cursor
Posted: Dec 27, 2010 2:43 PM
 
  Click to reply to this thread Reply

Hi all,
I alway get an error when trying to debug a stored procedure having a cursor declared. Please find below a simple procedure to reproduce the bug:

CREATE PROCEDURE proc_test()
begin
DECLARE done INT DEFAULT 0;
DECLARE myint INT DEFAULT 0;
declare curr_test cursor for select 1;

DECLARE CONTINUE HANDLER FOR NOT FOUND
begin
SET done = 1;
end;
OPEN curr_test;
read_loop: LOOP

IF done THEN
LEAVE read_loop;
END IF;
FETCH curr_test INTO myint;
END LOOP;
CLOSE curr_test;
end;


Legend
Guru: 2001 + pts
Expert: 751 - 2000 pts
Enthusiast: 31 - 750 pts
Novice: 0 - 30 pts
Moderators
Helpful answer (5 pts)
Answered (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums