Home » Developer & Programmer » Forms » global vs parameter
global vs parameter [message #395234] Tue, 31 March 2009 15:52 Go to next message
irfankundi786@yahoo.com
Messages: 269
Registered: February 2009
Location: pakistan
Senior Member

What is the differences b/w global variable and parameter in oracle form.
list me all the differences in both .
thanks
Re: global vs parameter [message #395517 is a reply to message #395234] Wed, 01 April 2009 13:14 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Learn how to use Forms Help system. Believe or not, it actually contains answer to your question. So - search for terms you are interested in, educate yourself and list all differences by yourself. Once you find them, you may post the answer and - if you'd like to continue discussion - do so.
Re: global vs parameter [message #395772 is a reply to message #395234] Thu, 02 April 2009 09:45 Go to previous messageGo to next message
marvSQL
Messages: 13
Registered: February 2008
Location: JAMAICA
Junior Member
Oracle does not really provide any way to declare global variables...well they get declared when you assign a value to them for example:
IF HAVE 2 FORMS :FORMA AND FORMB

IN FORMA
if i wanted to create a global variable called my_global_var and set it to 'hello' i would do somthing like this

:global.my_global_var := 'hello' ;

this variable will be visible by the forms within the current session and only within the current program.

IN FORMB
so if i have FORMB has a textbox called display,and i wanted to let the texbox value to show the value of the global variable the i would do somthing like this:
:display := :global.my_global_var ;



if i wanted to pass the same 'hello' by parameter and the name of the parameter is my_param_var then i would have to


IN FORMA
1.create a Parameter List (see help for Create_Parameter_List) .
2.add the parameter to the list useing Add_Parameter(see help for Add_Parameter) .(nb. the parameter name is my_param_var)

3.pass the parameter list and the called form to CALL_FORM built in.(see help for CALL_FORM )

IN FORMB (the form getting the parameter)
1. create the parameter with forms builder(nb the name of the parameter must be the name of the one passed by FORMA so it must be called my_param_var)

so if i have FORMB has a textbox called display,and i wanted to let the texbox value to show the value of the parameter the i would do somthing like this:
:display := :PARAMETER.my_my_param_var;


[EDITED by LF: removed superfluous empty lines]

[Updated on: Thu, 02 April 2009 15:22] by Moderator

Report message to a moderator

Re: global vs parameter [message #395834 is a reply to message #395772] Thu, 02 April 2009 15:21 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
marvypx@hotmail.com
Oracle does not really provide any way to declare global variables

By definition, global variable stores a character string which is up to 255 characters in length. Therefore, we may consider it ss
global_variable varchar2(255);


Your example shows one way to assign a value to a global variable; another one is the DEFAULT_VALUE built-in procedure.
Re: global vs parameter [message #395843 is a reply to message #395234] Thu, 02 April 2009 17:49 Go to previous message
rmoplusx
Messages: 19
Registered: February 2009
Junior Member
With Parameter you should use parameter list to transfere data between modules.
With Global variables you need not to use parameter list .
Previous Topic: tool_env.getvar parameter
Next Topic: Programatically Assign the table data to the Lable of Push Button
Goto Forum:
  


Current Time: Thu Dec 08 00:35:48 CST 2016

Total time taken to generate the page: 0.16246 seconds