Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2350
  • Last Modified:

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
0
Naveen Kumar
Asked:
Naveen Kumar
  • 3
1 Solution
 
SujithData ArchitectCommented:
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
 
SujithData ArchitectCommented:
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
 
SujithData ArchitectCommented:
"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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now