Re: commit inside a cursor oper

From: Billy OConnor <billyoc_at_iii1.iii.net>
Date: 1995/08/22
Message-ID: <41dtcg$bqu_at_iii1.iii.net>#1/1


Saad Ahmad (sahmad_at_mfa.com) wrote:
: Hi
 

: What kind of problems can arise if a code
: segment is doing a commit inside a cursor op.
: ie.
 

: OPEN CURSOR c1;
 

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

: some update;
: commit;
 

: }
 

: CLOSE c1;
 

: 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.

: --
: **************************************************************
: * Saad Ahmad *
: * McHugh Freeman & Associates, Inc. *
: * Ph: (414) 798-8606 Ext. 457 *
: * Fax: (414) 798-8619 *
: * E-Mail: sahmad_at_mfa.com *
: **************************************************************
 

-- 
/* Billy O'Connor                  email:  billyoc_at_iii.net
   D.P.S. Consulting, Boston MA      CIS:  74021,530
   Boston area OS/2 solutions                           */
   
Received on Tue Aug 22 1995 - 00:00:00 CEST

Original text of this message