M
Member 310024
Guest
I declare a cursor with hold and then open it.
I then do my fetch loop.
For each fetch, I lookup various other tables and under certain conditions, do a delete of one or more of the records I have looked up.
At the end of each loop, I issue a ROLLBACK command, if the program has been requested to be run in 'non update' mode.
But I'm finding that the ROLLBACK is killing my cursor because the very next fetch after the rollback, returns sqlcode -501. How can I stop the ROLLBACK from having this unwanted side affect?
I then do my fetch loop.
For each fetch, I lookup various other tables and under certain conditions, do a delete of one or more of the records I have looked up.
At the end of each loop, I issue a ROLLBACK command, if the program has been requested to be run in 'non update' mode.
But I'm finding that the ROLLBACK is killing my cursor because the very next fetch after the rollback, returns sqlcode -501. How can I stop the ROLLBACK from having this unwanted side affect?