--- title: "SQLEndTran | Microsoft Docs" ms.custom: "" ms.date: "06/13/2017" ms.prod: "sql-server-2014" ms.reviewer: "" ms.technology: native-client ms.topic: "reference" topic_type: - "apiref" helpviewer_keywords: - "SQLEndTran function" ms.assetid: 95cff841-c2d5-4e1e-a18d-f3d4696a5b85 author: MightyPen ms.author: genemi manager: craigg --- # SQLEndTran 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](sqlsetconnectattr.md). ## See Also [ODBC API Implementation Details](odbc-api-implementation-details.md) [SQLEndTran Function](https://go.microsoft.com/fwlink/?LinkId=59342)