Re: commit inside a cursor oper

From: Murthy Jarugumilli <murthy_at_tcs.com>
Date: 1995/08/23
Message-ID: <41e5ch$ceq_at_tcsi.tcs.com>#1/1


>: OPEN CURSOR c1;
 

>: for(;;)
>: {
>: FETCH c1;
 

>: some update;
>: commit;
 

>: }

..

>: I know this should not be done; but what problems
>: can arise in such a case? eg. locks lost etc.
>Without MODE=ORACLE being set, your cursor is closed as soon as you commit.
>Even with MODE=ORACLE, you'll lose your position in the cursor if you do a
>commit. You can work around this using ROWID.
>

This is what I understand (Perhaps, that's what Billy O'Conner was implying): With MODE=ANSI, when you do a commit or rollback, all cursors are closed, locks released. With MODE=ORACLE, if your cursor is a FOR UPDATE [OF] cursor, then it is closed, locks released. With MODE=ORACLE, if your cursor is not a FOR UPDATE cursor, then, it is not closed and therefore, you won't lose your position in the cursor if you do a commit.

Murthy Jarugumilli. Received on Wed Aug 23 1995 - 00:00:00 CEST

Original text of this message