--- title: "setLastUpdateCount Method (SQLServerDataSource) | Microsoft Docs" ms.custom: "" ms.date: "01/19/2017" ms.prod: "sql" ms.prod_service: "drivers" ms.service: "" ms.component: "jdbc" ms.reviewer: "" ms.suite: "sql" ms.technology: - "drivers" ms.tgt_pltfrm: "" ms.topic: "article" apiname: - "SQLServerDataSource.setLastUpdateCount" apilocation: - "sqljdbc.jar" apitype: "Assembly" ms.assetid: 5487631a-1107-4169-84ca-b77fd09bea66 caps.latest.revision: 18 author: "MightyPen" ms.author: "genemi" manager: "jhubbard" ms.workload: "Inactive" --- # setLastUpdateCount Method (SQLServerDataSource) [!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)] Sets a **Boolean** value that indicates if the lastUpdateCount property is enabled. ## Syntax ``` public void setLastUpdateCount(boolean lastUpdateCount) ``` #### Parameters *lastUpdateCount* **true** if lastUpdateCount is enabled. Otherwise, **false**. ## Remarks If the lastUpdateCount property is set to **true**, [!INCLUDE[jdbcNoVersion](../../../includes/jdbcnoversion_md.md)] will return only the last update count from from an SQL statement passed to the server. If the lastUpdateCount property is set to **false**, the driver will return all update counts including those returned by any triggers that may have fired. If the lastUpdateCount property is not set, the [getLastUpdateCount](../../../connect/jdbc/reference/getlastupdatecount-method-sqlserverdatasource.md) method returns the default value of **true**. ## See Also [SQLServerDataSource Members](../../../connect/jdbc/reference/sqlserverdatasource-members.md) [SQLServerDataSource Class](../../../connect/jdbc/reference/sqlserverdatasource-class.md)