Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Stored Proc - Array Param
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 contextSQL>
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