mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
cdcfae0a00
Update SQLDriverConnectW to record the driver ODBC version it supports. Fixup SQLColAttribute/W return SQL_COLUMN_TYPE column type when driver v2.0 and ODBC 3.0 request.
28 lines
1.3 KiB
Diff
28 lines
1.3 KiB
Diff
From b05ebe79d74d84c7354cecb3072812697839a61f Mon Sep 17 00:00:00 2001
|
|
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
|
Date: Wed, 8 Feb 2023 09:03:40 +1100
|
|
Subject: odbc32: Pass ODBC version when creating driver environment
|
|
|
|
|
|
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
|
index d590a5af0fe..389148b625a 100644
|
|
--- a/dlls/odbc32/proxyodbc.c
|
|
+++ b/dlls/odbc32/proxyodbc.c
|
|
@@ -2644,11 +2644,15 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl
|
|
if (connection->pSQLAllocHandle)
|
|
{
|
|
connection->pSQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &connection->driver_env);
|
|
- connection->pSQLAllocHandle(SQL_HANDLE_DBC, connection->driver_env, &connection->driver_hdbc);
|
|
|
|
if (connection->pSQLGetEnvAttr)
|
|
connection->pSQLGetEnvAttr(connection->driver_env, SQL_ATTR_ODBC_VERSION, &connection->driver_ver, 0, NULL);
|
|
|
|
+ if (connection->pSQLSetEnvAttr)
|
|
+ connection->pSQLSetEnvAttr(connection->driver_env, SQL_ATTR_ODBC_VERSION,
|
|
+ (SQLPOINTER)connection->environment->version, 0);
|
|
+
|
|
+ connection->pSQLAllocHandle(SQL_HANDLE_DBC, connection->driver_env, &connection->driver_hdbc);
|
|
}
|
|
/* ODBC 2.x */
|
|
else if(connection->pSQLAllocConnect && connection->pSQLAllocEnv)
|