Hi
I am trying something different. Trying to capture Ip address information in a trigger using owa_util.get_cgi_env('REMOTE_ADDR'). the problem is some time I will be inserting values from sqlplus.
when I try to insert values from sqlplus I am getting below error. I am stucked with this error can you please help me how to handle this error and how to capture Ipaddress in this situation.
SQL> insert into loc values (12222, 2, 'jkhs', 734, 'Y', 0);
insert into loc values (12222, 2, 'jkhs', 734, 'Y', 0)
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.OWA_UTIL", line 324
ORA-06512: at "TRIGGER_LOC", line 16
ORA-04088: error during execution of trigger 'TRIGGER_LOC'
11 if owa_util.get_cgi_env('REMOTE_ADDR') is null then
12 v_ipaddress := sys_context('USERENV','IPADDRESS');
13 else
14 v_ipaddress := owa_util.get_cgi_env('REMOTE_ADDR');
15 end if;
16 dbms_output.put_line(owa_util.get_cgi_env('REMOTE_ADDR'));
sys_context('USERENV','IPA
try sys_context('USERENV','IP_