Solved

COLLECTION_IS_NULL error

Posted on 2006-11-27
4
2,188 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
Suggested Courses

627 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