Solved

COLLECTION_IS_NULL error

Posted on 2006-11-27
4
2,102 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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This video shows how to recover a database from a user managed backup
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

808 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