Oracle Forms | How To Declare And Call Global Variable -35
To See More Forms Tutorial Click here • Oracle Forms: How to Install Oracle Databa...
To See More Reports Tutorial Click here • Introduction To Database & Out Line The Se...
Dear viewer, In this tutorial you will learn How To Declare And Call Global Variable.
You also know about Global Variable.
Global Variable:
-A global variable is a oracle forms variable whose value is accessible to triggers and subprograms in any module that is active during the current session.
-Global variables contain character data values. We can store maximum to 4000 bytes of char data, while in previous version it was limited to 255 bytes char.
-we can use the DEFAULT_VALUE built-in procedure to assign a value to a variable whose value is NULL.
Example:
DEFAULT_VALUE(‘ ’, ‘global.webadd’);
Declare Global Variable:
Create trigger WHEN-BUTTON-PRESSED
Code:
declare
v_record userinfo%rowtype;
begin
select * into v_record from userinfo
where username=:user_name;
if
v_record.pw=:pass then
:global.log_uname:=v_record.username;
end if;
open_form('E:\FORMS_ALL\MMS_form\MMS_demo\HOMEPAGE_OS_34.fmx');
end;
Calling Global Variable:
Create trigger WHEN-NEW-FORM-INSTANCE
Code:
:LOGUSER:=:global.log_uname;
To Get more Tutorial Subscribe The Channel
click here / @oracledbsolutions2678
To Get All Post Like The Facebook Page
Click here / oracledbsolutions
Follow us:
Facebook: / oracledbsolutions
Youtube link: / @oracledbsolutions2678
Facebook Group: / 465557066961548
Contact us:
email: [email protected]
Skype: oracle26solutions
Mob: 01734557080, 01627422780