Solved

COLLECTION_IS_NULL error

Posted on 2006-11-27
4
2,039 Views
Last Modified: 2008-01-09
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
0
Comment
Question by:Naveen Kumar
  • 3
4 Comments
 
LVL 27

Accepted Solution

by:
sujith80 earned 500 total points
ID: 18018489
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
 
LVL 27

Expert Comment

by:sujith80
ID: 18018496
FYI:
COLLECTION_IS_NULL is the oracle predefined exception for error code : 6531
0
 
LVL 28

Author Comment

by:Naveen Kumar
ID: 18028867
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
 
LVL 27

Expert Comment

by:sujith80
ID: 18034730
"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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now