permaculture playing cards*
The moose likes JDBC and the fly likes CallableStatement (Oracle JDBC) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "CallableStatement (Oracle JDBC)" Watch "CallableStatement (Oracle JDBC)" New topic
Author

CallableStatement (Oracle JDBC)

Phyllis @systemetrix
Greenhorn

Joined: Mar 08, 2005
Posts: 2
The close of the CallableStatement and the Connection are leaving open cursors in my database. Any ideas what I can do to tighten up the code so that the cursors are closed?

Is there another route other than callablestatement? The call is to a procedure within a package that has an output parameter.

Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

"Phyllis @systemetrix",

We're pleased to have you here with us on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1121

Phyllis,
If your "CallableStatement" is returning a "ResultSet", I suggest you also close the "ResultSet" -- preferrably in the following order:
  • ResultSet
  • CallableStatement
  • Connection


  • Good Luck,
    Avi.
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
     
    subject: CallableStatement (Oracle JDBC)
     
    Similar Threads
    CallableStatement in loop
    how to close unused open cursors
    Databse Cursor not getting closed
    CallableStatements and Scrolling
    PreparedStatement's - how do you use them CORRECTLY?