When using a ODBC v2 driver, the function SQLSetEnvAttr might not be available.
-- v2: odbc32: SQLSetEnvAttr isnt supported in ODBC v2.0
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
--- dlls/odbc32/proxyodbc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index feea5de9bed..63407742e11 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -1190,7 +1190,7 @@ static int has_suffix( const WCHAR *str, const WCHAR *suffix )
static SQLRETURN set_env_attr( struct environment *env, SQLINTEGER attr, SQLPOINTER value, SQLINTEGER len ) { - SQLRETURN ret = SQL_ERROR; + SQLRETURN ret = SQL_SUCCESS;
if (env->hdr.unix_handle) { @@ -1199,7 +1199,8 @@ static SQLRETURN set_env_attr( struct environment *env, SQLINTEGER attr, SQLPOIN } else if (env->hdr.win32_handle) { - ret = env->hdr.win32_funcs->SQLSetEnvAttr( env->hdr.win32_handle, attr, value, len ); + if (env->hdr.win32_funcs->SQLSetEnvAttr) + ret = env->hdr.win32_funcs->SQLSetEnvAttr( env->hdr.win32_handle, attr, value, len ); }
return ret;
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=147795
Your paranoid android.
=== debian11b (64 bit WoW report) ===
Report validation errors: mshtml:script crashed (c0000005)
The Jet driver is an interesting case, it exports SQLSetEnvAttr() but not SQLGetEnvAttr(). It doesn't crash when calling SQLConnect() because we currently only need SQLSetEnvAttr().
FWIW, the Amazon Athena driver also exports SQLSetEnvAttr().
This merge request was closed by Alistair Leslie-Hughes.