--- title: "getAutoCommit Method (SQLServerConnection) | Microsoft Docs" ms.custom: "" ms.date: "01/19/2017" ms.prod: sql ms.prod_service: connectivity ms.reviewer: "" ms.technology: connectivity ms.topic: conceptual apiname: - "SQLServerConnection.getAutoCommit" apilocation: - "sqljdbc.jar" apitype: "Assembly" ms.assetid: af1f67f4-f568-4e58-abcc-5c809a89b547 author: David-Engel ms.author: v-daenge --- # getAutoCommit Method (SQLServerConnection) [!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)] Retrieves the current auto-commit mode for this [SQLServerConnection](../../../connect/jdbc/reference/sqlserverconnection-class.md) object. ## Syntax ``` public boolean getAutoCommit() ``` ## Return Value **true** if auto-commit mode is enabled, **false** if it is not. ## Exceptions [SQLServerException](../../../connect/jdbc/reference/sqlserverexception-class.md) ## Remarks This getAutoCommit method is specified by the getAutoCommit method in the java.sql.Connection interface. ## See Also [SQLServerConnection Members](../../../connect/jdbc/reference/sqlserverconnection-members.md) [SQLServerConnection Class](../../../connect/jdbc/reference/sqlserverconnection-class.md)