--- title: "SQLEndTran" description: "SQLEndTran" author: markingmyname ms.author: maghan ms.date: "03/14/2017" ms.service: sql ms.subservice: native-client ms.topic: "reference" helpviewer_keywords: - "SQLEndTran function" apitype: "DLLExport" --- # SQLEndTran [!INCLUDE[SQL Server Azure SQL Database Synapse Analytics PDW](../../includes/applies-to-version/sql-asdb-asdbmi-asa-pdw.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](../../odbc/reference/syntax/sqlendtran-function.md)