2024-07-17 23:30:03 -07:00
|
|
|
From 20bf2dea9241d387c9415d816ea96e1947d8a710 Mon Sep 17 00:00:00 2001
|
2024-07-14 14:20:30 -07:00
|
|
|
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
|
|
|
Date: Fri, 12 Jul 2024 14:55:47 +1000
|
2024-07-17 23:30:03 -07:00
|
|
|
Subject: [PATCH 09/15] odbc32: SQLSetConnectAttr/W handle fallback function
|
2024-07-14 14:20:30 -07:00
|
|
|
|
|
|
|
---
|
|
|
|
dlls/odbc32/proxyodbc.c | 16 ++++++++++++++--
|
|
|
|
1 file changed, 14 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
2024-07-17 23:30:03 -07:00
|
|
|
index 462661f43de..e24557fbb11 100644
|
2024-07-14 14:20:30 -07:00
|
|
|
--- a/dlls/odbc32/proxyodbc.c
|
|
|
|
+++ b/dlls/odbc32/proxyodbc.c
|
2024-07-17 23:30:03 -07:00
|
|
|
@@ -2301,7 +2301,13 @@ SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut
|
2024-07-14 14:20:30 -07:00
|
|
|
}
|
|
|
|
else if (handle->win32_handle)
|
|
|
|
{
|
|
|
|
- ret = handle->win32_funcs->SQLSetConnectAttr( handle->win32_handle, Attribute, Value, StringLength );
|
|
|
|
+ if(handle->win32_funcs->SQLSetConnectOption)
|
|
|
|
+ ret = handle->win32_funcs->SQLSetConnectAttr( handle->win32_handle, Attribute, Value, StringLength );
|
|
|
|
+ else if(handle->win32_funcs->SQLSetConnectOption)
|
|
|
|
+ {
|
|
|
|
+ /* ODBC v2 */
|
|
|
|
+ ret = handle->win32_funcs->SQLSetConnectOption( handle->win32_handle, Attribute, (SQLULEN)Value );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2024-07-17 23:30:03 -07:00
|
|
|
@@ -4429,7 +4435,13 @@ SQLRETURN WINAPI SQLSetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribu
|
2024-07-14 14:20:30 -07:00
|
|
|
}
|
|
|
|
else if (handle->win32_handle)
|
|
|
|
{
|
|
|
|
- ret = handle->win32_funcs->SQLSetConnectAttrW( handle->win32_handle, Attribute, Value, StringLength );
|
|
|
|
+ if (handle->win32_funcs->SQLSetConnectAttrW)
|
|
|
|
+ ret = handle->win32_funcs->SQLSetConnectAttrW( handle->win32_handle, Attribute, Value, StringLength );
|
|
|
|
+ else if(handle->win32_funcs->SQLSetConnectOptionW)
|
|
|
|
+ {
|
|
|
|
+ /* ODBC v2 */
|
|
|
|
+ ret = handle->win32_funcs->SQLSetConnectOptionW( handle->win32_handle, Attribute, (SQLULEN)Value );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
--
|
|
|
|
2.43.0
|
|
|
|
|