Home » Developer & Programmer » Forms » how to get client ip address (Forms 6i, ORacle 10G, Oracle 9ias)
icon4.gif  how to get client ip address [message #443366] Mon, 15 February 2010 06:03 Go to next message
vibhavari
Messages: 20
Registered: October 2009
Junior Member
Please suggest me any method to get the ip address of Client machine using oracle forms .
I am using Oracle forms 6i and application serveer 9i.
Thanks in advance .
Re: how to get client ip address [message #443370 is a reply to message #443366] Mon, 15 February 2010 06:10 Go to previous messageGo to next message
tamzidulamin
Messages: 132
Registered: October 2009
Location: Dhaka
Senior Member
Dear,

If u configure webutil u can get ip address form the following code:
  webutil_clientinfo.get_ip_address; 


Regrads,

Tamzidul Amin.
Re: how to get client ip address [message #443572 is a reply to message #443370] Tue, 16 February 2010 05:23 Go to previous messageGo to next message
vibhavari
Messages: 20
Registered: October 2009
Junior Member
thanks but i am using Oracle forms 6i and Oralce 9ias.
So there is nothing like webutil.
any other method please .
Re: how to get client ip address [message #443650 is a reply to message #443572] Tue, 16 February 2010 13:33 Go to previous messageGo to next message
Martin Eysackers
Messages: 80
Registered: October 2005
Location: Belgium
Member
For 6i have a look here :
http://www.oracle.com/technology/sample_code/products/forms/extracted/getclientinfo/readme.html
Re: how to get client ip address [message #443670 is a reply to message #443650] Tue, 16 February 2010 22:22 Go to previous messageGo to next message
tamzidulamin
Messages: 132
Registered: October 2009
Location: Dhaka
Senior Member
You can try the following code:

Declare
vIpAddress varchar2(265);
Begin
select sys_context('userenv','ip_address')
into vIpAddress 
from dual;
End;
Re: how to get client ip address [message #443676 is a reply to message #443670] Tue, 16 February 2010 22:57 Go to previous messageGo to next message
vibhavari
Messages: 20
Registered: October 2009
Junior Member
Thanks. it is wroking fine in Toad. but in forms
is is giving error
Identifier sys_context must be declared....
Please help
Re: how to get client ip address [message #443745 is a reply to message #443676] Wed, 17 February 2010 03:03 Go to previous messageGo to next message
tamzidulamin
Messages: 132
Registered: October 2009
Location: Dhaka
Senior Member
Create a database function from the following code:
CREATE OR REPLACE FUNCTION FIND_IPADDRESS return CHAR IS
V_IP VARCHAR2(50);
BEGIN
select sys_context('userenv','ip_address') into v_ip from dual;
return v_ip;
END;


Now write a WHEN-BUTTON-PRESSED trigger in Developer Form.

Begin
 vClientIp:= FIND_IPADDRESS;
End;


Regrads,

Tamzidul Amin.
Re: how to get client ip address [message #443749 is a reply to message #443745] Wed, 17 February 2010 03:13 Go to previous messageGo to next message
vibhavari
Messages: 20
Registered: October 2009
Junior Member
its giving the ipaddress of sever only not client machine.
Re: how to get client ip address [message #443752 is a reply to message #443749] Wed, 17 February 2010 03:35 Go to previous messageGo to next message
tamzidulamin
Messages: 132
Registered: October 2009
Location: Dhaka
Senior Member
Dear,

the above function returns ip_address of that machine
from where your a user in connected NOT database server.
I think you know forms6i is client-server version.

From where a user is connected in your software,you must have install a runtime of developer6i.

So sys_context('userenv','ip_address') will show client_ip
by using current session.


Regrads,
Tamzidul Amin.
Re: how to get client ip address [message #443753 is a reply to message #443749] Wed, 17 February 2010 03:39 Go to previous message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Hope this will help you....
http://www.oracle.com/technology/sample_code/products/forms/6idemos.html
download get client info ...
Good luck
sriram Smile
Previous Topic: Upgrading Java with Forms/Reports 6i
Next Topic: ORA-12514: Message 12514 not found; product=RDBMS80; facility=ORA
Goto Forum:
  


Current Time: Fri Sep 20 03:59:05 CDT 2024