Page 2 of 2

Posted: Tue Sep 19, 2006 7:23 am
by ahmadbilal
May be i m wrong.

Can You Send Me The Sample Form .FMB On My Email Address
abmian1981@gmail.com
I have tried It On AS as Well On Runtime But Can't Get The Required Results.i want to store IP adress of Client Dataentry machine With Username and Timestamp.

Thanks in Anticipation

Posted: Tue Sep 19, 2006 8:00 am
by Kashif
SCOTT@KSM> Select sys_context('USERENV','IP_ADDRESS') from dual;

SYS_CONTEXT('USERENV','IP_ADDRESS')
--------------------------------------------------------------------
192.168.1.7

SCOTT@KSM> Select sys_context('USERENV','OS_USER') from dual;

SYS_CONTEXT('USERENV','OS_USER')
--------------------------------------------------------------------
Kashif

SCOTT@KSM> Select sys_context('USERENV','TERMINAL') from dual;

SYS_CONTEXT('USERENV','TERMINAL')
--------------------------------------------------------------------
KASHIF

SCOTT@KSM> Select sys_context('USERENV','SESSION_USER') from dual;

SYS_CONTEXT('USERENV','SESSION_USER')
--------------------------------------------------------------------
SCOTT


All the Above Queries Result in on Client side.
as My database Server Name is DBserver. its IP address is Different then the Above. and it is Logined with the DSERVER.

Hope u understand it..

Posted: Tue Sep 19, 2006 8:09 am
by ahmadbilal
Mr Kashif
what is result when U will use tit in Oracle Forms 6i and the from run on diffrent machine from where database is instaled.

Posted: Tue Sep 19, 2006 8:45 am
by Kashif
Sorry Mr Ahmad.

I check the Quires in the FORM. It is Not working in Developer 6i.
Giving error on SYS_CONTEXT (Unknown Identifier)..
But its Working Fine in SQL Plus. and Give the 100% Acurate result.
Sorry again.

Please Use the Following.

Select userenv('TERMINAL') from dual; (will Return Comuter Name)
Select USER from dual; (will Return Session User "Database User")
Select Sysdate from Dual (For Getting Current Time/Date)

Above 3 Queries are Tested in Forms 6i and Forms 10g as well.

Posted: Tue Sep 19, 2006 8:58 am
by ahmadbilal
No Problem.

For Gettiing user Name In
Dev 6i
DS 9i
DS 10G

We have to use Getclientinfo jar File Provided By oracle and Avaliable On Metalink and OTN. If you Need any help feel free to contact me

Posted: Tue Sep 19, 2006 9:07 am
by Kashif
Thankx Mr. Ahmad.

actually never Develop the FORM for WEB.
and we are Using the Above Queries for the Required Result.
and these are working fine.

Thanks u again.