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: default values with out parameter

Re: default values with out parameter

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Fri, 09 Jul 2004 15:38:09 -0700
Message-ID: <1089412704.242918@yasure>


Quantarc wrote:

> hi, i am accessing an oracle 9.2 database using ado with vb6 (the driver
> is OraOLEDB.Oracle.1) and i am using reference cursors in package
> procedures to return recordset back to my application (like described at
> http://www.vbip.com/books/1861003927/chapter_3927_15.asp). my problem
> is that i have a procedure whose parameters have default values that i
> would like to be able to use should i not want to specify parameters as
> input... which i do like this...
>
> FOO.BAR( ? );
>
> for this procedure...
>
> procedure BAR ( foo number, mycur OUT MYCURSOR );
>
> but i always get an error saying that not all the variables are bound.
> am i right in thinking that the non-bound variable is the OUT parameter.
> do i have to specify a default for this? if so what? when i call the
> procedure with an argument for the 'foo' parameter there isn't a
> problem, i don't have to specify a variable then.
>
> i have searched the web and usenet but not found anyone else having the
> same problem.
>
> any pointers would be appriciated, thanx.
>
> rod.

Are you making reference to someting like the following syntax?

CREATE OR REPLACE PROCEDURE w_default (num_rows PLS_INTEGER DEFAULT 20) IS

i all_objects.object_name%TYPE;

BEGIN
    FOR r IN (SELECT object_name FROM all_objects

              WHERE rownum < num_rows+1)     LOOP
       dbms_output.put_line(r.object_name);     END LOOP;
END with_default;
/

Daniel Morgan Received on Fri Jul 09 2004 - 17:38:09 CDT

Original text of this message

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