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: Stored Proc - Array Param

Re: Stored Proc - Array Param

From: <tcorey_at_mindspring.com>
Date: 2 Jun 2006 13:43:46 -0700
Message-ID: <1149281026.023218.283330@y43g2000cwc.googlegroups.com>


I got my stored procedure in a state where it can be called from the oci
api. The stored procedure uses an array of numbers as a parameter. If I
make the following declaration:

  1 create or replace type myNumArray as   2* table of number
SQL> / Type created.

. . . and use 'myNumArray' as a parameter to a stored procedure then it
is
not callable from oci. I tried the following declaration:

SQL> edit
Wrote file afiedt.buf

  1 create or replace type myNumArray as   2* table of number index by binary_integer SQL> / Warning: Type created with compilation errors.

SQL> show errors
Errors for TYPE MYNUMARRAY:

LINE/COL ERROR

-------- ------------------------------------------------------------
0/0      PL/SQL: Compilation unit analysis terminated
2/2      PLS-00355: use of pl/sql table not allowed in this context
SQL>
. . . but this declaration did not work. I wanted to make sure my new
type
was recognized as an array of numbers indexed by a number. However, the
above declaration is legal in the following form:

SQL> edit
Wrote file afiedt.buf

  1 create or replace package numArrTest is type numArray is   2 table of number index by binary_integer;   3 procedure num_array (p_array in out numArray);   4* end;
SQL> / Package created.

. . . the stored proc is now callable thru the oci.

-g Received on Fri Jun 02 2006 - 15:43:46 CDT

Original text of this message

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