#1  
Old 12-27-2001, 12:38 PM
siew wei
Guest
 
Posts: n/a
ROLLBACK problem

while i issue a FETCH after ROLLBACK, the cursor remain the record.
For example i have 3 records
1000, 2000, 3000 (transaction number)
when the 1000 has error it will rollback.
After that i issue FETCH in order to get 2000, but i found out it will fetch the 1000 again.
I like to know how to fetch the next record.
  #2  
Old 12-27-2001, 03:23 PM
phoenixcu
Guest
 
Posts: n/a
prepare your select statement or fetch again

Try to commit after fetch since Rollback will bring you back to last commit point. I didn't try, but it's normal practice for commitment control.

Or you may prepare you select statement again to avoid bad record,open cursor and then fetch.
  #3  
Old 12-29-2001, 12:46 AM
B.Hauser
Guest
 
Posts: n/a
Rollback

Hi,

When using COMMIT or ROLLBACK, the open cursors are closed.

You have to declare your cursor "WITH HOLD".
The WITH HOLD option on DECLARE CURSOR may be used to keep
the cursor open after a COMMIT or ROLLBACK.

Use ROLLBACK HOLD to keep the cursor open.

Birgitta
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 07:22 AM.