capturing client operating system user name [message #273611] |
Thu, 11 October 2007 01:33 |
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 #276347 is a reply to message #273611] |
Wed, 24 October 2007 23:04 |
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
|
|
|