Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 1.79 KB

File metadata and controls

45 lines (32 loc) · 1.79 KB
title setFetchSize Method (SQLServerResultSet)
description setFetchSize Method (SQLServerResultSet)
author David-Engel
ms.author davidengel
ms.date 01/19/2017
ms.service sql
ms.subservice connectivity
ms.topic reference
apilocation sqljdbc.jar
apiname SQLServerResultSet.setFetchSize
apitype Assembly

setFetchSize Method (SQLServerResultSet)

[!INCLUDEDriver_JDBC_Download]

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.

Syntax

  
public void setFetchSize(int rows)  

Parameters

rows

An int indicating the number of rows to fetch.

Exceptions

SQLServerException

Remarks

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

See Also

SQLServerResultSet Members
SQLServerResultSet Class