Re: Setting OAS PL/SQL ToolKit Function Values

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Tue, 11 Jan 2000 11:10:55 -0500
Message-ID: <nelm7so5mgf474b9ljapfmc52ljgu2bmh4_at_4ax.com>


A copy of this was sent to Alethea <stanggirl_at_my-deja.com> (if that email address didn't require changing) On Tue, 11 Jan 2000 15:07:04 GMT, you wrote:

>Hello,
>
>I'm getting errors when I use the owa_util.get_cgi.env function.
>Following are the three values that I'm receiving the errors on:
>
>v_sid := owa_util.get_cgi_env ('REMOTE_USER')
>v_port := owa_util.get_cgi_env ('SERVER_PORT')
>v_server := owa_util.get_cgi_env ('SERVER_NAME')
>
>It seems like the pl/sql toolkit functions' values haven't been set. I
>re-installed the pl/sql toolkit but it made no difference. I created
>the following procedure to test "get_cgi_env":
>
>SQL> create or replace procedure test_500481 is
> 2 begin
> 3 owa_util.print_cgi_env;
> 4 end;
> 5 /
>
>Procedure created.
>
>SQL> exec test_500481
>begin test_500481; end;
>
>*
>ERROR at line 1:
>ORA-06502: PL/SQL: numeric or value error
>ORA-06512: at "OAS_PUBLIC.OWA_UTIL", line 329
>ORA-06512: at "SUPER.TEST_500481", line 3
>ORA-06512: at line 1
>
>SQL> exec owa_util.showpage
>
>PL/SQL procedure successfully completed.
>
>Can anyone tell me how to set the pl/sql toolkit functions' values or
>suggest a solution? Thank you!
>

normally, these are set for you from OAS. When running in plsql, you can use a block such as:

declare

    nm owa.vc_arr;
    vl owa.vc_arr;
begin

    nm(1) := 'VARIABLE_NAME';
    vl(1) := 'VARIABLE_VALUE';
    owa.init_cgi_env( 1, nm, vl );
end;
/

to stuff whatever name/value pairs you want to into that "environment".

>Alethea
>
>
>
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.

-- 
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
 
Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation
Received on Tue Jan 11 2000 - 17:10:55 CET

Original text of this message