Solved

COLLECTION_IS_NULL error

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

Suggested Solutions

Title # Comments Views Activity
Oracle Pivot Question 8 64
sort a spool into file output in oracle 1 30
How to free up undo space? 3 43
Oracle encryption 12 34
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

831 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