Reputation: 1594
Why does
set serveroutput on;
select owa_util.get_cgi_env('REMOTE_ADDR') from dual;
generate a ORA-06502 PL/SQL: numeric or value error
?
I'm running this from TOAD session.
Upvotes: 1
Views: 3132
Reputation: 86
you Need to initialize before before using the owa routines.
try this code:
declare
nm owa.vc_arr;
vl owa.vc_arr;
test_var VARCHAR2(32000);
BEGIN
owa.init_cgi_env( nm.count, nm, vl );
select owa_util.get_cgi_env('REMOTE_ADDR') INTO test_var from dual;
DBMS_OUTPUT.PUT_LINE('Output-->'||test_var);
end;
Upvotes: 3