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: Sybrand Bakker <sybrandb_at_hccnet.nl>
Date: Fri, 09 Jul 2004 20:30:05 +0200
Message-ID: <orote01h77abfhkuks05p0ihnm0n5pb0go@4ax.com>


On Fri, 09 Jul 2004 15:05:40 +0100, Quantarc <info_at_quantarc.co.uk> 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.

OUT variables don't have default values. Which is quit logical, they are OUT variable (you can't assign to them). You seem to discuss IN OUT variables.
If you want the out variable to have a default value, you must assign in the procedure, and use the OUT variable in calling the procedure. Logic dictates if your variable is a *true* OUT variable, you can't leave it out when calling the procedure.

--
Sybrand Bakker, Senior Oracle DBA
Received on Fri Jul 09 2004 - 13:30:05 CDT

Original text of this message

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