Home » Developer & Programmer » Forms » Forms 10g Global Variable (Server 2003)
Forms 10g Global Variable [message #512376] Sun, 19 June 2011 21:47 Go to next message
mrnaveed
Messages: 74
Registered: December 2009
Location: Pakistan
Member
Dear All,

How can i get the Current user log in on my system. please tell me steps using global variable.
Re: Forms 10g Global Variable [message #512419 is a reply to message #512376] Mon, 20 June 2011 04:40 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
Assuming you mean oracle user then you would just use the user function. No need for global variables.
If you mean something else you'll have to supply more details.
Re: Forms 10g Global Variable [message #512423 is a reply to message #512419] Mon, 20 June 2011 05:05 Go to previous messageGo to next message
mrnaveed
Messages: 74
Registered: December 2009
Location: Pakistan
Member
when i log in using log in form which i have created as i log in then the menu form appears i want to show currently log in user on menu form which have a user text box the name should be displayed in user text box.
Re: Forms 10g Global Variable [message #512424 is a reply to message #512423] Mon, 20 June 2011 05:11 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
Is this an oracle user? In other words can log into the DB via sqlplus with that username?
Or is this an application user you store in a table somewhere?
Re: Forms 10g Global Variable [message #512446 is a reply to message #512424] Mon, 20 June 2011 06:24 Go to previous messageGo to next message
mrnaveed
Messages: 74
Registered: December 2009
Location: Pakistan
Member
I have resolved the issue it was a table level user not a db level user
Re: Forms 10g Global Variable [message #512532 is a reply to message #512446] Mon, 20 June 2011 23:07 Go to previous messageGo to next message
mrnaveed
Messages: 74
Registered: December 2009
Location: Pakistan
Member
But when i try to login it only excepts one user i.e i have three users in my users table but it only excepts one user other two users can not login in application here is my code please help me.



DECLARE

a number;

BEGIN

select count(*) into a from users
where upper(username) = upper(:login.user_name) and password =:login.password;

if a=0 then
a:=show_alert('Unsucessfull');
clear_form(no_validate,no_commit);
else
:global.username:=:login.user_name;
OPEN_FORM('d:\project\opt_form.fmx',no_hide,no_replace);
exit_form(no_validate,no_commit);

end if;

exception when others then
a:=show_alert('Unsucessfull');
END;
Re: Forms 10g Global Variable [message #512585 is a reply to message #512532] Tue, 21 June 2011 01:34 Go to previous message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
Try removing the exception handler.
Previous Topic: FORM 6i Requirement
Next Topic: Form to read unix file system
Goto Forum:
  


Current Time: Sat Sep 07 16:05:53 CDT 2024