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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Avoid Parameters being sent to PL/SQL Procedure.

Re: Avoid Parameters being sent to PL/SQL Procedure.

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 01 Oct 1998 17:45:31 GMT
Message-ID: <3625bf82.108178772@192.86.155.100>


A copy of this was sent to "Romain Voes" <Romain.Voes_at_VlaamsParlement.be> (if that email address didn't require changing) On Thu, 1 Oct 1998 17:43:20 +0200, you wrote:

>I am writing an internet application which shows a variable number of screen
>elements (textboxes and checkboxes). On a first screen. When the user uses
>the submit button to send his entered values back, a second procedure has to
>get 'some' of these parameters in, but not all.
>In the current situation the program fails to run because the number of send
>parameters doesn't match with the number of expected parameters.
>Now if there were a fixed number of screen elements I could define dummy
>entries in the procedure description to intercept the unneeded param's but
>now I haven't got a clue how to work around this one. Could anyone put me
>back on the tracks?
>

Have you tried using DEFAULTS for these parameters? For example:

create procedure the_procedure( var1 in varchar2 DEFAULT NULL,

                                var2 in varchar2 DEFAULT NULL, 
                               ..... )

...

That way, you can call the_procedure, the_procedure( var1 => 'x' ), the_procedure( var2 => 'y' ) and so on....  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Thu Oct 01 1998 - 12:45:31 CDT

Original text of this message

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