--- title: "SQLEndTran | Microsoft Docs" ms.custom: "" ms.date: "03/14/2017" ms.prod: "sql" ms.prod_service: "database-engine, sql-database, sql-data-warehouse, pdw" ms.service: "" ms.component: "native-client-odbc-api" ms.reviewer: "" ms.suite: "sql" ms.technology: ms.tgt_pltfrm: "" ms.topic: "reference" apitype: "DLLExport" helpviewer_keywords: - "SQLEndTran function" ms.assetid: 95cff841-c2d5-4e1e-a18d-f3d4696a5b85 caps.latest.revision: 30 author: "MightyPen" ms.author: "genemi" manager: "craigg" ms.workload: "Inactive" monikerRange: ">= aps-pdw-2016 || = azuresqldb-current || = azure-sqldw-latest || >= sql-server-2016 || = sqlallproducts-allversions" --- # SQLEndTran [!INCLUDE[appliesto-ss-asdb-asdw-pdw-md](../../includes/appliesto-ss-asdb-asdw-pdw-md.md)] [!INCLUDE[SNAC_Deprecated](../../includes/snac-deprecated.md)] By default, the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Native Client ODBC driver closes a statement's associated cursor when **SQLEndTran** commits or rolls back an operation. Server cursors are closed unless they are static. When **SQLEndTran** commits or rolls back an operation, the behavior of the statement's associated cursor is determined by the value of the driver-specific ODBC connection attribute SQL_COPT_SS_PRESERVE_CURSORS, set by [SQLSetConnectAttr](../../relational-databases/native-client-odbc-api/sqlsetconnectattr.md). ## See Also [ODBC API Implementation Details](../../relational-databases/native-client-odbc-api/odbc-api-implementation-details.md) [SQLEndTran Function](http://go.microsoft.com/fwlink/?LinkId=59342)