Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> offline- Returning pl/sql table from a proc. dynamically..
Hi,
I want to return a PL/SQL Table dynamically from a pl/sql procedure dynamically.
Here , is the package which has the procedure :
procedure proc1(no number, pltab out dbms_sql.varchar2_table)
as
tempdate date;
begin
pltab(1):='First'; pltab(2):='Second'; pltab(3):='Second'; pltab(4):='Second'; pltab(5):='Second';
Fire. sql calls the above procedure :
Fire.sql
pltab2 dbms_sql.varchar2_table;
ln_num number:=100;
c number;
dummy number;
stmt varchar2(100);
begin
stmt := 'begin pk1.proc1(:ln_num, :pltab); end;'; c := dbms_sql.open_cursor;
dbms_sql.parse(c, stmt, dbms_sql.native); dbms_sql.bind_variable(c, ':ln_num', ln_num); dbms_sql.bind_array(c, ':pltab', pltab2,1,1);dummy := dbms_sql.execute(c);
On executing, the above code shows the foll. error:
declare
*
ERROR at line 1:
ORA-29252: collection does not contain elements at index locations in
call to dbms_sql.bind_array
ORA-06512: at "SYS.DBMS_SYS_SQL", line 605 ORA-06512: at "SYS.DBMS_SQL", line 146 ORA-06512: at line 21
Can anyone tell me the reason?
This code has been tried in 8.0.4 , 8.1.6 and 8.1.7 (SOLARIS) oracle
versions. It reports the same error.
Thank You.
Arul.
This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Mon Jul 16 2001 - 06:32:40 CDT
![]() |
![]() |