COLLECTION_IS_NULL error

can someone give me pl/sql block of code which can raise this exception for an example ?

I tried to raise this ( by trying to access some element of a automatically null collection ) but i am getting

value of sqlcode:-6531
value of sqlerrm:ORA-06531: Reference to uninitialized collection

instead of COLLECTION_IS_NULL exception.

Thanks
LVL 28
Naveen KumarProduction Manager / Application Support ManagerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
sujith80Connect With a Mentor Commented:
declare
 type t1 is table of number;
 l_t1 t1 ;
begin
 l_t1(1) := 10;
exception
 when COLLECTION_IS_NULL then
  dbms_output.put_line(' COLLECTION IS NULL Exception');
end;
/
0
 
sujith80Commented:
FYI:
COLLECTION_IS_NULL is the oracle predefined exception for error code : 6531
0
 
Naveen KumarProduction Manager / Application Support ManagerAuthor Commented:
ok..

I got the answer because the exception was over ridden by a local one and so i had to say something like

standard.collection_is_null to get it.

Thanks
0
 
sujith80Commented:
"over ridden by a local one "
would be interesting to know how

By the way; you should look at the "how to ask questions page" to see "how to award grades" to answers. If you found the answer by yourself; you can ask for a refund of points. *NOT" award "C" grade for an posting that answers the question.

Please go ahead re-open and ask for a refund.
0
All Courses

From novice to tech pro — start learning today.