Home » SQL & PL/SQL » SQL & PL/SQL » Index for PL/SQL Table out of Range for Host Language
Index for PL/SQL Table out of Range for Host Language [message #223443] Thu, 08 March 2007 23:40 Go to next message
anil_sapra
Messages: 35
Registered: May 2006
Location: DELHI
Member

I have created a package/procedure as below :-

Create or replace package Get_Employee as
Type vemp_tbl is table of emp.ename%type
index by binary_integer;
Procedure GetEmployeeList(vename out vemp_tbl);
end Get_Employee;


Create or replace package body Get_Employee as
Procedure GetEmployeeList(vename out vemp_tbl) is
cursor vemp_cur is
select ename from emp order by 1;
recCount number default 0;
begin
for vEmpRec in vemp_cur loop
recCount := recCount+1;
vename(recCount) := vEmpRec.ename;
end loop;
End GetEmployeeList;
end Get_Employee;


I am using the above procedures in my front end application
where I have used Arrays for vename & I am able to fetch the records
when records are about 1500-2000 but I facing an error when records
are more than 8000.

ORA-06513: PL/SQL: index for PL/SQL table out of range for host language
array ORA-06512: at line 1

Pl.help me out for the above problem.

Regards,

Anil Sapra
Re: Index for PL/SQL Table out of Range for Host Language [message #223452 is a reply to message #223443] Fri, 09 March 2007 00:08 Go to previous messageGo to next message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
Did you declare a fixed array size in your host language? Have you exceeded that fixed size?
Re: Index for PL/SQL Table out of Range for Host Language [message #223457 is a reply to message #223443] Fri, 09 March 2007 00:23 Go to previous message
anil_sapra
Messages: 35
Registered: May 2006
Location: DELHI
Member

Thanks for your immediate reply.

No, I have not declared fixed array size.
I have used array as usual as I do usually, it may contain any
no. of records.

I have declared array as under :-
String: vemp[*] (Using arrays this way we can store any no.
of records in array)

this way we use it & we can get the records using
Set xemp = vemp[0]
Set xemp = vemp[1]
Set xemp = vemp[2]
Set xemp = vemp[3]


Anil Sapra



Previous Topic: find value or datatype of a varriable
Next Topic: How can we load a LOBS data usng Sql loader?
Goto Forum:
  


Current Time: Sat Dec 10 11:03:06 CST 2016

Total time taken to generate the page: 0.19551 seconds