Global Variable in developer 9i [message #279877] |
Sun, 11 November 2007 06:35 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
janaq
Messages: 22 Registered: August 2007
|
Junior Member |
|
|
Dear All,
I want to use global variable to retrive data in my forms. I have two forms namely Login and Inprogress. Please can any one help me with the syntax give below:
In the Login form I have the below mentioned code on When-Button-Press:
Declare
v_uname varchar(100);
v_pwd varchar(100);
v_usertype varchar(100);
alert_id alert;
choice number;
alert_id1 alert;
choice1 number;
v_num number;
begin
select username, password, usertypeid into v_uname, v_pwd, v_usertype
from user_master
where username = :login.username
and user_master.active = 'Yes';
select count(*) into v_num
from user_master
where username = :login.username
and password = :login.password
and user_master.active = 'Yes';
if v_num > 0 then
if v_usertype = 1 then
call_form ('E:\FinalProject\FinalProject\CUSTOMER.fmx', hide, do_replace);
:global.user_id :=1;
end if;
In the Inprogress form where I want to call the global variable I have the below code on When-New-Form-Instance
When I login with the Login form it logs in successfully but when i call the inprogress form it gives me the error:
FRM:40815: Variable GLOBAL.USERID does not exit
Can any one help me with this please.
Regards.
|
|
|
|
|
|
|
Re: Global Variable in developer 9i [message #280091 is a reply to message #280076] |
Mon, 12 November 2007 08:00 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
janaq
Messages: 22 Registered: August 2007
|
Junior Member |
|
|
Hi,
Sorry I mistakenly asked about the data update, actually I want to know that while inserting the data into the database from a form how can I assign the value of Global Variable to a column of that table i.e. on inseting the response i want to assign the userid which i have pass from the global variable.
Please help!!!
Regards.
|
|
|
|