Sunday, 18 August 2013

Closing the cursor of a ResultSet?

Closing the cursor of a ResultSet?

From this oracle java tutorial:
The following statement specifies that the cursor of the ResultSet object
generated from the getPrice query is closed when the commit method is
called. Note that if your DBMs does not support
ResultSet.CLOSE_CURSORS_AT_COMMIT, then this constant is ignored:
getPrice = con.prepareStatement(query, ResultSet.CLOSE_CURSORS_AT_COMMIT);
Does it mean that ResultSet.CLOSE_CURSORS_AT_COMMIT closes the ResultSet?
It appears from the name that it just closes the cursore of the
ResultSet.. what use would it be if that was the case? PS: I am aware that
the closing of whatever the thing happens after con.commit(). But what
actually get closed? the cursor? what do they mean by the cursor? Thanks
in advance.

No comments:

Post a Comment