views:

37

answers:

2

Hi, 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.

+3  A: 

The default holdability is implementation specific, but you can get the default holdability by calling the getResultSetHoldability method on the DatabaseMetaData for the Connection.

You can also see section 6.1.9 in the Oracle / Sun JDBC docs for details: http://download.oracle.com/javase/1.4.2/docs/guide/jdbc/getstart/resultset.html

Riaan Cornelius
Right on Riaan.
CoolBeans
+2  A: 

"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.

CoolBeans