Re: Forms and packages in this form

From: Rolf Unger <rolf.unger_at_ctilabs.de>
Date: 17 Mar 2004 12:32:48 -0800
Message-ID: <32fe19ad.0403171232.7a7fbeb6_at_posting.google.com>


"Jan Gelbrich" <j_gelbrich_at_westfalen-blatt.de> wrote in message news:<c2785v$1q4ue6$1_at_ID-93924.news.uni-berlin.de>...
> "Rolf Unger" <rolf.unger_at_ctilabs.de> schrieb im Newsbeitrag
> news:32fe19ad.0403031130.6acce913_at_posting.google.com...
> > Hi,
> >
> > I'm using Oracle Forms 5.0, but I guess my question should not
> > be related to a certain version.
> >
>
> BTW: Just keep in mind that 6i is bound to be desupported and 5 already is.
>
> > I have declared a package (not in the database, but in the
> > Form-Builder under 'Program Units'):
> >
> > [ ... ]
>
> AFAIK and as afr as I can see your package, You use "local" variables
> and no globals that could persist in other forms (i am not sure anput it).
> Globals can be defined anywhere.
>
> > What happens to my package variables, when the form is unloaded?
>
> They would not persist any longer.
>
> > Do they persist somewhere in the shared global area?
>
> No. Only if and as long as You would use some bind variables.
> And they would only stay as long as the Form is open.
>
> >
> > Would they be persistent if I would move the package into a library?
>
> AFAIK, also No. Only if You would use some bind variables.
>
> >
> > 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.
>
> Did You try Record Groups ? I found them very useful to make my codes
> flexible and easy to maintain for changes.
> PL/SQL-tables are one-dimensional, RGs can be multi-dimensional, just like a
> real table.
>
> >
> > Any hints, maybe how to find something about that kind of background
> > handling in the Forms documentation, are welcome ...
>
> Forms are hell bad documentated. The most complete docco is the online help
> (F1).
> It takes some time to get used to it, but then there is no place where You
> could find more.
>
> Aside of that I know only of a handful books about Forms out there.
> It is because Forms (and Reports) never was and never will be mainstream
> programming,
> they are all out for the Java stuff.
>
> >
> > Thanks, Rolf
>
> Maybe somebody else could tell You more details,
> greetings
>
> hth, Jan

Hm,

I have just re-installed Forms 6i. This time on a faster machine. I had a look at the online documentation ... and they have a extensive discussion under
 Tips&Tricks -> For PL/SQL -> Record Groups, Global Variables and Parameters

Maybe my interpretation goes to far, but what I read out of this article is: "Global variables are a pain, never use them, unless you need dynamic variables ... and even in that case it's better to use dynamic Record Groups."

This is just for the sake of completeness if somebody is wondering: What are they talking about? This is fully described in the Forms Docu ...

Cheers, Rolf. Received on Wed Mar 17 2004 - 21:32:48 CET

Original text of this message