Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Passing array values into pl/sql procedure via a URL

Re: Passing array values into pl/sql procedure via a URL

From: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Wed, 26 Apr 2006 20:17:41 +0200
Message-ID: <e2oddl$gqk$1@news4.zwoll1.ov.home.nl>


Jeremy wrote:
> I thought I had this all sorted out.....
>
> Created a type:
>
> create type vc2000_array as table of varchar2(2000)
> /
>
> Then I defined a procedure thus:
>
> procedure campaign_form
> (p_web_site_id in number,
> p_camp_code in varchar2 default null,
> p_style_id in number default null,
> p_title in varchar2 default null,
> p_name in vc2000_array default vc2000_array(),
> p_value in vc2000_array default vc2000_array());
>
>
> This is to be executed via web browser through mod_plsql
>
> If I call it like this:
>
> <hostname etc.>/campaign_form?p_web_site_id=304&p_camp_code=XX
>
> It executes.
>
> But if it is called like this
>
> <hostname etc.>/campaign_form?p_web_site_id=304
> &p_camp_code=XX&p_name=nam1
>
> It fails with an error in the log file
>
> [Wed Apr 26 18:38:55 2006] [error] mod_plsql: /plql/campaign_form HTTP-
> 404 ORA-06550: line 10, column 2:
> PLS-00306: wrong number or types of arguments in call to 'CAMPAIGN_FORM'
> ORA-06550: line 10, column 2:
> PL/SQL: Statement ignored
>
> In I had thought I would be able to pass in multiple values of p_name in
> the URL like:
> &p_name=name1&p_name=name2 etc
> but find I cannot even pass just one in :(
>
> Any ideas anyone?
>

quote:

To invoke mod_plsql in a Web browser, input the URL in the following format: protocol://hostname[:port]/DAD_location/[[!][schema.][package.]proc_name[?query_string]]

! character

Indicates to use the flexible parameter passing scheme. See Section 1.6.2, "Flexible Parameter Passing" for more information.
/quote

Quoted from the mod_plsql Users Guide (B12303-01) Basically, you can pass a name array, as well as a value array. Think this is what you want

-- 
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
Received on Wed Apr 26 2006 - 13:17:41 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US