Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JDBC: default holdability of a ResultSet

is there a defined default for the holdability of ResultSet, if Connection.setHoldability() is never invoked or a holdability is never specified during the creation of a statement?

I could not find anything in the JDBC api docs - so is it implementation specific?

Thank you.

like image 681
MRalwasser Avatar asked Sep 01 '10 15:09

MRalwasser


People also ask

What is the default type of ResultSet in JDBC application?

The default ResultSet type is TYPE_FORWARD_ONLY . Note: Not all databases and JDBC drivers support all ResultSet types. The method DatabaseMetaData.

Is ResultSet scrollable by default?

By default, ResultSet objects are not scrollable and not updatable. The default holdability depends on the data source, and can be determined from the DatabaseMetaData.

What is the default type of ResultSet in JDBC applications updatable forward only?

By default, ResultSet object can be moved forward only and it is not updatable.

What is cursor Holdability?

By activating cursor holdability, you keep a result set available across transaction boundaries for use by multiple JDBC calls. The holdability setting triggers a database cursor to keep newly updated rows active beyond the commit of the transaction that generated the new values, or result set.


1 Answers

"The default holdability property of a ResultSet object is implementation defined. The default holdability of ResultSet objects returned by the underlying data source can be determined using the APIs provided by JDBC 3.0."

Please see this link for reference.

like image 107
CoolBeans Avatar answered Oct 06 '22 00:10

CoolBeans