2024-06-10 18:49:25 -07:00
|
|
|
From b05ebe79d74d84c7354cecb3072812697839a61f Mon Sep 17 00:00:00 2001
|
2023-02-16 15:44:46 -08:00
|
|
|
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
|
|
|
Date: Wed, 8 Feb 2023 09:03:40 +1100
|
2024-06-10 18:49:25 -07:00
|
|
|
Subject: odbc32: Pass ODBC version when creating driver environment
|
2023-02-16 15:44:46 -08:00
|
|
|
|
|
|
|
|
|
|
|
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
2024-06-10 18:49:25 -07:00
|
|
|
index d590a5af0fe..389148b625a 100644
|
2023-02-16 15:44:46 -08:00
|
|
|
--- a/dlls/odbc32/proxyodbc.c
|
|
|
|
+++ b/dlls/odbc32/proxyodbc.c
|
2024-06-10 18:49:25 -07:00
|
|
|
@@ -2644,11 +2644,15 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl
|
2023-02-16 15:44:46 -08:00
|
|
|
if (connection->pSQLAllocHandle)
|
|
|
|
{
|
|
|
|
connection->pSQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &connection->driver_env);
|
2024-06-10 18:49:25 -07:00
|
|
|
- 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);
|
|
|
|
|
2023-02-16 15:44:46 -08:00
|
|
|
+ if (connection->pSQLSetEnvAttr)
|
|
|
|
+ connection->pSQLSetEnvAttr(connection->driver_env, SQL_ATTR_ODBC_VERSION,
|
|
|
|
+ (SQLPOINTER)connection->environment->version, 0);
|
|
|
|
+
|
2024-06-10 18:49:25 -07:00
|
|
|
+ connection->pSQLAllocHandle(SQL_HANDLE_DBC, connection->driver_env, &connection->driver_hdbc);
|
2023-02-16 15:44:46 -08:00
|
|
|
}
|
2024-06-10 18:49:25 -07:00
|
|
|
/* ODBC 2.x */
|
2024-06-06 19:55:05 -07:00
|
|
|
else if(connection->pSQLAllocConnect && connection->pSQLAllocEnv)
|