Home » Developer & Programmer » Forms » capturing client operating system user name (capturing client operating system user name)
capturing client operating system user name [message #273611] Thu, 11 October 2007 01:33 Go to next message
iffi_97
Messages: 2
Registered: October 2007
Junior Member
Hi,

I am using oracle forms 6i and I need to capture the client operating system user name in forms 6i. How can I do that.

what I want to do over all is that when a user logon into operating system , his os user name is used to login to the oracle database automatically.

thanks in anticipation
Re: capturing client operating system user name [message #273617 is a reply to message #273611] Thu, 11 October 2007 01:44 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Look at http://www.orafaq.com/forum/m/87420/67467/?srch=user+name+d2kwutil#msg_87420

David
Re: capturing client operating system user name [message #276347 is a reply to message #273611] Wed, 24 October 2007 23:04 Go to previous message
sirfkashif
Messages: 70
Registered: September 2007
Location: Rawalpindi
Member
salam brother
first u have to create a database function given below

CREATE OR REPLACE FUNCTION RETURN_USER_NAME
RETURN VARCHAR2
IS
USER_NAME_V VARCHAR2(100);
BEGIN
SELECT SYS_CONTEXT('USERENV','OS_USER')
INTO USER_NAME_V
FROM DUAL;
RETURN(USER_NAME_V);
END;

then say on ur given form "form1" write this tirgger
when-new-form-instance
:block1.user_name := return_user_name;

and on text item "user_name" in block1 u will get client side operating system user name

regards
Previous Topic: Help For TNS
Next Topic: network name inside form
Goto Forum:
  


Current Time: Sat Dec 10 22:18:02 CST 2016

Total time taken to generate the page: 0.03775 seconds