Global variables in oracle libraries

Tags:
Global Variables
libraries
Oracle Forms
Hello I want to use global variable s in oracle Library. I am using forms builder 6i. But they give an error. But when I use the same in form's pre_form or another form level trigger, its ok. I want to use the global variable in Library(in pll file). Any suggestions please??????

Software/Hardware used:
Oracle Forms 6i

Answer Wiki

Thanks. We'll let you know when a new response is added.

Library modules are compiled independently of forms, and thus the values of global variables are out of scope of library program units (you cannot access them directly).

However, you can use the NAME_IN built-in function to reference them.

For example, instead of:

<pre>:GLOBAL.your_variable</pre>

Reference the value of the variable this way:

<pre>Name_In(‘GLOBAL.your_variable’)</pre>

If you want to set the value of the global variable inside your library program units, you can use the COPY built-in procedure, for example:

<pre>Copy(‘something’,’GLOBAL.your_variable’);</pre>

But, I would prefer to create the library procedures with parameters (IN or OUT) to pass data between forms and the library, instead of using global variables this way.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Jurisprudence1000
    [...] Global variables in oracle libraries, asked by Jurisprudence1000 and answered by [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following