From 3a815fdc2731ffe21a617668e7cd4570196e02c5 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Mon, 6 Feb 2023 09:26:57 +1100 Subject: [PATCH 13/42] odbc32: Foward SQLDisconnect request onto driver --- dlls/odbc32/proxyodbc.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index 96357cd3f1d..65f882968c6 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -583,9 +583,23 @@ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNum */ SQLRETURN WINAPI SQLDisconnect(SQLHDBC ConnectionHandle) { + struct SQLHDBC_data *connection = ConnectionHandle; SQLRETURN ret = SQL_ERROR; - FIXME("(ConnectionHandle %p)\n", ConnectionHandle); + TRACE("(ConnectionHandle %p)\n", ConnectionHandle); + + if (connection->type != SQL_HANDLE_DBC) + { + WARN("Wrong handle type %d\n", connection->type); + return SQL_ERROR; + } + + if (connection->pSQLDisconnect) + { + ret = connection->pSQLDisconnect(connection->driver_hdbc); + } + + TRACE("ret %d\n", ret); return ret; } -- 2.39.1