Files
wine-staging/patches/odbc32-fixes/0015-odbc32-Various-ANSI-fallback.patch
Alistair Leslie-Hughes 3714d05e91 Updated odbc32-fixes patchset
2025-09-08 09:54:01 +10:00

77 lines
3.3 KiB
Diff

From 6a082863d0f060d429833e663a12f1fcea2646b7 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sat, 26 Apr 2025 19:18:17 +1000
Subject: [PATCH] odbc32: Various ANSI fallback
Needs spliting.
---
dlls/odbc32/proxyodbc.c | 31 +++++++++++++++++++++++++++----
1 file changed, 27 insertions(+), 4 deletions(-)
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
index bfec7c0aa18..299d4eb2580 100644
--- a/dlls/odbc32/proxyodbc.c
+++ b/dlls/odbc32/proxyodbc.c
@@ -6487,7 +6487,13 @@ static SQLRETURN get_connect_attr_win32_w( struct connection *con, SQLINTEGER at
{
if (con->hdr.win32_funcs->SQLGetConnectAttrW)
return con->hdr.win32_funcs->SQLGetConnectAttrW( con->hdr.win32_handle, attr, value, buflen, retlen );
- if (con->hdr.win32_funcs->SQLGetConnectAttr) FIXME( "Unicode to ANSI conversion not handled\n" );
+ if (con->hdr.win32_funcs->SQLGetConnectAttr)
+ {
+ SQLRETURN ret = con->hdr.win32_funcs->SQLGetConnectAttr( con->hdr.win32_handle, attr, value, buflen, retlen );
+ if (ret == SQL_ERROR)
+ FIXME( "Unicode to ANSI conversion not handled\n" );
+ return ret;
+ }
return SQL_ERROR;
}
@@ -6653,7 +6659,12 @@ static SQLRETURN get_diag_field_win32_w( SQLSMALLINT type, struct object *obj, S
if (obj->win32_funcs->SQLGetDiagFieldW)
return obj->win32_funcs->SQLGetDiagFieldW( type, obj->win32_handle, rec_num, diag_id, diag_info, buflen,
retlen );
- if (obj->win32_funcs->SQLGetDiagField) FIXME( "Unicode to ANSI conversion not handled\n" );
+ if (obj->win32_funcs->SQLGetDiagField)
+ {
+ FIXME( "Unicode to ANSI conversion not handled\n" );
+ return obj->win32_funcs->SQLGetDiagField( type, obj->win32_handle, rec_num, diag_id, diag_info, buflen,
+ retlen );
+ }
return SQL_ERROR;
}
@@ -6856,7 +6867,13 @@ static SQLRETURN set_connect_attr_win32_w( struct connection *con, SQLINTEGER at
{
if (con->hdr.win32_funcs->SQLSetConnectAttrW)
return con->hdr.win32_funcs->SQLSetConnectAttrW( con->hdr.win32_handle, attr, value, len );
- if (con->hdr.win32_funcs->SQLSetConnectAttr) FIXME( "Unicode to ANSI conversion not handled\n" );
+ if (con->hdr.win32_funcs->SQLSetConnectAttr)
+ {
+ SQLRETURN ret = con->hdr.win32_funcs->SQLSetConnectAttr( con->hdr.win32_handle, attr, value, len );
+ if (ret == SQL_ERROR)
+ FIXME( "Unicode to ANSI conversion not handled\n" );
+ return ret;
+ }
else if(con->hdr.win32_funcs->SQLSetConnectOptionW)
{
/* ODBC v2 */
@@ -8095,7 +8112,13 @@ static SQLRETURN set_desc_field_win32_w( struct descriptor *desc, SQLSMALLINT re
{
if (desc->hdr.win32_funcs->SQLSetDescFieldW)
return desc->hdr.win32_funcs->SQLSetDescFieldW( desc->hdr.win32_handle, record, id, value, len );
- if (desc->hdr.win32_funcs->SQLSetDescField) FIXME( "Unicode to ANSI conversion not handled\n" );
+ if (desc->hdr.win32_funcs->SQLSetDescField)
+ {
+ SQLRETURN ret = desc->hdr.win32_funcs->SQLSetDescField( desc->hdr.win32_handle, record, id, value, len );
+ if (ret == SQL_ERROR)
+ FIXME( "Unicode to ANSI conversion not handled (%d)\n", id );
+ return ret;
+ }
return SQL_ERROR;
}
--
2.50.1