Re: max open cursors

From: Marc <E.Mail_at_address.com>
Date: Fri, 7 May 1999 07:51:28 +0200
Message-ID: <7gtv4o$bga$1_at_vkhdsu24.hda.hydro.com>


I know there is a bug in Forms 5.0. It might be the same in Forms 4.5. The solution is to put the queries in a pll or in a trigger (following text is about updates, but it also happens for selects).



***
*
<Bug:611884>
Component: SF40 Comp Ver: 5.0.5.4.0 Rel St: P Updated: 02-SEP-98

***
*
Abstract: USE OF SHARE_LIBRARY_DATA EFFECTS WHEN CURSORS ARE CLOSED

***
*
Problem:
Normally: FormA calls FormB. FormB say issues an Update statement. This
          creates a cursor.
          When you exit FormB the cursor is closed.
If However, the SHARE_LIBRARY_DATA option is used on the call or open form then the Cursor allocated for the update is not closed when the called form is exited. It is not closed until the whole runform session exits. This applies to cursors created by procedures, functions or packages in the called form (i.e. Not in a library)
The result of this is that if you call and exit a form several times, you end
up using many more cursors.
Testcase:
on wrvms bug$ bug611884 Two forms: FORMA & FORMB To Reproduce:
  Run FormA, press the "Not Shared" button, in FormB Press the Update EMP   Button. Exit FormB and Press the "Not Shared" button Again and then do the
  Update again.
  If you monitor this you will see a cursor Created for the Update, then   closed as you exit the FormB, then the Whole Thing Repeated.   Now:
  Run FormA, this time repeat the whole sequence, but choose the "Shared"   Button.
  This time you will see that the Update cursor is not closed when FormB   is exited and Another cursor will be allocated next time through.

The only current way to work around this is to put the code that creates implicit cursors in triggers or libraries iso local program units

Marc

mgyuri wrote in message <7gidpv$iuu_at_helka.iif.hu>...
>Hi there !
>I have problem a in forms 4.5. I created one big procedure wich has around
>40 "for loop end loop" style cursors some "select into" statements and few
>dynamic sql statements.
>when i run this program i have "ORA-01000 maximum open cursors exceeded "
>(it is 100, defined in initoracl.ora), and I do not understand how could it
>happend, because as I know the "for loop end loop" cursor handling closes
>the cursors automatically, so I can not miss the closing.
>
>what is wrong with that ? How can I check the number of open cursor during
>the run time ?
>
>thanx in advance !
>
>
>
>
Received on Fri May 07 1999 - 07:51:28 CEST

Original text of this message