From fc34342d52977928717c0b9f45bff99613461201 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Mon, 6 Feb 2023 09:26:57 +1100 Subject: [PATCH] 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 886fe07efb9..eb274c5da5b 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -574,9 +574,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.43.0