Compartir a través de


getHoldability Method (SQLServerResultSet)

Retrieves the holdability of this SQLServerResultSet object.

Nota

This feature is introduced starting with the Microsoft SQL Server JDBC Driver version 2.0.

public int getHoldability()

Valor devuelto

An int value that contains one of the following holdability levels:

HOLD_CURSORS_OVER_COMMIT

CLOSE_CURSORS_AT_COMMIT

Excepciones

SQLServerException

Observaciones

This getHoldability method is specified by the getHoldability method in the java.sql.ResultSet interface.

To set the result set holdability, applications can use the setHoldability method of the SQLServerConnection class. After the setHoldability method is called and the statement object and its result set object are created and the statement is executed, the application may need to change the holdability again.

For server cursors, when connected to SQL Server 2005 or SQL Server 2008, setting holdability affects only the holdability of new result sets that are yet to be created on that connection. However, with SQL Server 2000, setting holdability affects the holdability of both existing result sets and new result sets that are yet to be created on that connection.

When the holdability is reset and the getHoldability method is called on the previously created result set object, the value returned by this method may be different than the holdability value returned by the following methods: Statement.getResultSetHoldability, Connection.getHoldability, or DatabaseMetaData.getResultSetHoldability.

Vea también

Referencia

SQLServerResultSet Class

Conceptos

SQLServerResultSet Methods
SQLServerResultSet Members