Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Exception Handling with cursors

ProhanNov 2 2009 — edited Nov 6 2009
I just did some research into the issue of the automatic closing of cursors when the block that has opened them ends. Evidently, this happens in many circumstances, but it is not a documented feature, thus the programmer is not supposed to rely on it always working.

So does this mean that whenever you have a subprogram that opens a cursor you should have exception handlers with "Close" statements, in case the cursor is open at the time the exception is raised? Would that constitute "Best practices"? Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 4 2009
Added on Nov 2 2009
11 comments
3,457 views