setFetchSize Method (SQLServerResultSet)

Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this SQLServerResultSet object.

public void setFetchSize(int rows)

参数

rows

An int indicating the number of rows to fetch.

异常

SQLServerException

备注

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

If the fetch size specified is zero, the JDBC driver ignores the value and estimates what the fetch size should be. The default value is set by the SQLServerStatement object that created the result set. The fetch size can be changed at any time.

This method changes the block fetch size for server cursors, and takes effect the next time the JDBC driver needs to call sp_cursorfetch. Setting the fetch size to zero restores the default fetch size for the cursor type that is currently in use

另请参见

参考

SQLServerResultSet Class

概念

SQLServerResultSet Methods
SQLServerResultSet Members