Rebase against ba66d9c71519176bd499eb846ed11fb0ea421118.

This commit is contained in:
Alistair Leslie-Hughes 2024-08-20 07:43:11 +10:00
parent a90554bb04
commit e780e2e62d
3 changed files with 1 additions and 79 deletions

View File

@ -1,35 +0,0 @@
From 8256bfe5ed31fd521b0baa9085819557653be5e3 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 18 Jul 2024 14:17:44 +1000
Subject: [PATCH] odbc32: SQLSetEnvAttr isnt supported in ODBC v2.0
---
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 2a62fd88d64..4f23c761f5a 100644
--- a/dlls/odbc32/proxyodbc.c
+++ b/dlls/odbc32/proxyodbc.c
@@ -1162,7 +1162,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)
{
@@ -1171,7 +1171,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;
--
2.43.0

View File

@ -1,43 +0,0 @@
From bf50a23bd4bd098a51b4944f1c22a9d2a71fc454 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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 d0661406fae..cf13669d051 100644
--- a/dlls/odbc32/proxyodbc.c
+++ b/dlls/odbc32/proxyodbc.c
@@ -1219,7 +1219,7 @@ static SQLRETURN create_env( struct environment *env, BOOL is_unix )
static SQLRETURN set_con_attr( struct connection *con, SQLINTEGER attr, SQLPOINTER value, SQLINTEGER len )
{
- SQLRETURN ret = SQL_ERROR;
+ SQLRETURN ret = SQL_SUCCESS;
if (con->hdr.unix_handle)
{
@@ -1242,6 +1242,17 @@ static SQLRETURN set_con_attr( struct connection *con, SQLINTEGER attr, SQLPOINT
ret = con->hdr.win32_funcs->SQLSetConnectAttrW( con->hdr.win32_handle, attr, value, len );
else if (con->hdr.win32_funcs->SQLSetConnectAttr)
ret = con->hdr.win32_funcs->SQLSetConnectAttr( con->hdr.win32_handle, attr, value, len );
+ else if (con->hdr.win32_funcs->SQLSetConnectOptionW)
+ {
+ ret = con->hdr.win32_funcs->SQLSetConnectOptionW( con->hdr.win32_handle, attr, (SQLULEN)value );
+
+ /* If an option isn't supported on other driver, then just return success for now. */
+ if(ret != SQL_SUCCESS)
+ {
+ FIXME("Driver returned %d for option %d\n", ret, attr);
+ ret = SQL_SUCCESS;
+ }
+ }
}
return ret;
--
2.43.0

View File

@ -1 +1 @@
16a6b0ad65e9b8cdbb68fc9125951483781ca616
ba66d9c71519176bd499eb846ed11fb0ea421118