my dog learned polymorphism
The moose likes JDBC and Relational Databases and the fly likes how to close unused open cursors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "how to close unused open cursors" Watch "how to close unused open cursors" New topic

how to close unused open cursors

partho mukherjee

Joined: Jun 08, 2006
Posts: 13
can we directly close the cursor declared in a CallableStatement without assinging it to a ResultSet?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14991

This question is not about SCJP.
Moving to JDBC forum.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32609

What Java object are you referring to? We have a Connection, CallableStatement and ResultSet object. Doesn't the ResultSet refer to the cursor?

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
partho mukherjee

Joined: Jun 08, 2006
Posts: 13
I was referring to the Callablestatement object. I found that it has a method getParameterMetaData() in JDBC 3.0 which gives me some information about the parameters(in and out) declared in the CallableStatement.
But do we have anyway to refer to the parameters in a generic way if I am using an older version of JDBC?
I want to close all open cursors without having to refer to the ResultSet, i.e I have only the CallableStatement object at my disposal. Is there any way?
I agree. Here's the link:
subject: how to close unused open cursors
jQuery in Action, 3rd edition