Hola soy Maria, y querria saber si es posible obtener la direccion IP en el Forms, de alguna manera, al igual que se puede obtener el USERNAME, PASSWORD... Muchas gracias
1 respuesta
Respuesta
1
1
Anónimo
How to get the IP address of the user ------------------------------------- Many users may require to get the IP address of the connected user to either log them with the application transactions or to perform security schemes based on the IP address of the session. One way to get the IP address of the session is to use the SYS_CONTEXT function. SYS_CONTEXT returns the value of attribute associated with the context namespace. SYS_CONTEXT function is available with Oracle 8i database, therefore you can test the SYS_CONTEXT from SQL*Plus connecting to any Oracle 8i Database using the following statement: Select SYS_CONTEXT('USERENV','IP_ADDRESS') From Dual; Because Developer Forms up to 6i is based on 8.0.6 required support files, you can not write the previous statement directly in any program unit or trigger in Forms. You need to create a stored function on the database and call it from any program unit or trigger in Forms. A sample stored function can be: CREATE OR REPLACE Function IP RETURN Varchar2 IS v_ip Varchar2(30); Begin Select SYS_CONTEXT('USERENV','IP_ADDRESS') Into v_ip From Dual; Return v_ip; End;