func (conn *Connection) Rollback() (err *ODBCError) { ret := C.SQLEndTran(C.SQL_HANDLE_DBC, conn.Dbc, C.SQL_ROLLBACK) if !Success(ret) { err = FormatError(C.SQL_HANDLE_DBC, conn.Dbc) } return }
func (conn *Connection) Commit() (err *ODBCError) { ret := C.SQLEndTran(C.SQL_HANDLE_DBC, conn.Dbc, C.SQL_COMMIT) if !Success(ret) { err = FormatError(C.SQL_HANDLE_DBC, conn.Dbc) } return }
func SQLEndTran(handleType SQLSMALLINT, handle SQLHANDLE, completionType SQLSMALLINT) (ret SQLRETURN) { r := C.SQLEndTran(C.SQLSMALLINT(handleType), C.SQLHANDLE(handle), C.SQLSMALLINT(completionType)) return SQLRETURN(r) }