diff --git a/patches/odbc32-fixes/0016-odbc32-set_con_attr-return-success-by-default.patch b/patches/odbc32-fixes/0016-odbc32-set_con_attr-return-success-by-default.patch new file mode 100644 index 00000000..da4ef081 --- /dev/null +++ b/patches/odbc32-fixes/0016-odbc32-set_con_attr-return-success-by-default.patch @@ -0,0 +1,43 @@ +From 10eb455088bfa3dbcc9e7431395614e75793bf13 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Sat, 20 Jul 2024 12:56:26 +1000 +Subject: [PATCH] odbc32: set_con_attr return success by default + +--- + dlls/odbc32/proxyodbc.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c +index dee73f0618e..1706e0f0d93 100644 +--- a/dlls/odbc32/proxyodbc.c ++++ b/dlls/odbc32/proxyodbc.c +@@ -994,7 +994,7 @@ static SQLRETURN create_env( struct handle *handle, BOOL is_unix ) + + static SQLRETURN set_con_attr( struct handle *handle, SQLINTEGER attr, SQLPOINTER value, SQLINTEGER len ) + { +- SQLRETURN ret = SQL_ERROR; ++ SQLRETURN ret = SQL_SUCCESS; + + if (handle->unix_handle) + { +@@ -1017,6 +1017,17 @@ static SQLRETURN set_con_attr( struct handle *handle, SQLINTEGER attr, SQLPOINTE + ret = handle->win32_funcs->SQLSetConnectAttrW( handle->win32_handle, attr, value, len ); + else if (handle->win32_funcs->SQLSetConnectAttr) + ret = handle->win32_funcs->SQLSetConnectAttr( handle->win32_handle, attr, value, len ); ++ else if (handle->win32_funcs->SQLSetConnectOptionW) ++ { ++ ret = handle->win32_funcs->SQLSetConnectOptionW( handle->win32_handle, attr, (SQLULEN)value ); ++ ++ /* If an option isn't supported on other driver, then just return success for now. */ ++ if(!ret) ++ { ++ FIXME("Driver retured %d for option %d\n", ret, attr); ++ ret = SQL_SUCCESS; ++ } ++ } + } + return ret; + } +-- +2.43.0 +