aspose file tools*
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
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: 61437
    
  67

"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: 1134

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.
     
    It is sorta covered in the JavaRanch Style Guide.
     
    subject: CallableStatement (Oracle JDBC)