Home » Developer & Programmer » Forms » network name inside form
network name inside form [message #87417] Sat, 01 January 2005 01:27 Go to next message
Senthil
Messages: 68
Registered: December 1999
Member
Hi

Is it possible to get the computer name(network name) inside the form ? i.e i want to get the computer name while running form to store the computer name in the database for monitoring purpose. What is the command to do this job.

Please help me.

Regards

Senthil
Re: network name inside form [message #87420 is a reply to message #87417] Sun, 02 January 2005 19:34 Go to previous messageGo to next message
Himanshu
Messages: 457
Registered: December 2001
Senior Member
Hi,
This can be achived by using functions provided in D2kwutil.pll libraray.

To get the WINDOW's user login name make use of
WIN_API_ENVIRONMENT.GET_WINDOWS_USER_NAME & to get any registry entry which also includes the network name of your computer make use of WIN_API_ENVIRONMENT.READ_REGISTRY.

HTH
Regards
Himanshu
Re: network name inside form [message #273631 is a reply to message #87420] Thu, 11 October 2007 02:20 Go to previous messageGo to next message
iffi_97
Messages: 2
Registered: October 2007
Junior Member
Hi,
please can u help me how to write the code for WIN_API_ENVIRONMENT.GET_WINDOWS_username. I have attached the said library but dont know how to use this feature.

Please tell me with an example. how and where to use this code in forms 6i
Re: network name inside form [message #276346 is a reply to message #273631] Wed, 24 October 2007 23:03 Go to previous messageGo to next 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
Re: network name inside form [message #276349 is a reply to message #276346] Wed, 24 October 2007 23:06 Go to previous message
sirfkashif
Messages: 70
Registered: September 2007
Location: Rawalpindi
Member
sorry brother
in function return_user_name
change
'os_user' with 'TERMINAL'
Previous Topic: capturing client operating system user name
Next Topic: how to create a calendar?
Goto Forum:
  


Current Time: Mon Mar 10 14:39:30 CDT 2025