Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Forms and packages in this form

Forms and packages in this form

From: Rolf Unger <rolf.unger_at_ctilabs.de>
Date: 3 Mar 2004 11:30:40 -0800
Message-ID: <32fe19ad.0403031130.6acce913@posting.google.com>


Hi,

I'm using Oracle Forms 5.0, but I guess my question should not be related to a certain version.

I have declared a package (not in the database, but in the Form-Builder under 'Program Units'):

PACKAGE thisform
IS
  TYPE t_integer IS TABLE OF NUMBER(1) INDEX BY BINARY_INTEGER;

PACKAGE BODY thisform
 IS

BEGIN

  n_selected := 8;
  n_fields := 0;
END; I use them to keep track of the of 3 "on-off" radio-button groups on the control block F_IMP_COLUMNS. If I say "control" block, I mean its items are not associated with any database object.

If this would be a database stored package, the scope would be clear: "The first time I use a function/procedure/variable of this package, the package is loaded into Global-Area and the intialisation code between BEGIN and END of the package body is executed." Then the package variables will be valid until my session ends, until I log out.

But now my Application consists of multiple forms and at runtime I do load other forms and unload this one with the package (I use 'New_Form' to do this) and later on the user may come back to this form.

What happens to my package variables, when the form is unloaded? Do they persist somewhere in the shared global area?

Would they be persistent if I would move the package into a library?

Basically I don't care for persistence, I would rather like it if those package variables have the liftime of the form. Well, the package variables were in my first attempt just items in a hidden datablock, but then I realised that I would need a PL/SQL table and I couldn't use a block anymore.

Any hints, maybe how to find something about that kind of background handling in the Forms documentation, are welcome ...

Thanks, Rolf Received on Wed Mar 03 2004 - 13:30:40 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US