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!

Close ref cursor from java program

User_CK27AOct 1 2014 — edited Oct 3 2014

I'm using Oracle 11g, trying to call a stored procedure which returns a ref cursor. The issue is that we need to reuse the connection because the stored procedure uses a global temp table.

I notice that the cursor returned from the stored proc is not closed despite doing resultset.close and statement.close. How do I close the cursor without closing the connection?  I'm using Java 7, ojdbc7.jar

I've tried connection.commit(), but that does not release resources.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 31 2014
Added on Oct 1 2014
10 comments
4,543 views