Files
wine-staging/patches/odbc32-fixes/0025-odbc32-Various-ascii-fallback.patch
Alistair Leslie-Hughes eff3de6ad2 Updated odbc32-fixes patchset
2025-04-30 14:13:01 +10:00

77 lines
3.3 KiB
Diff

From 74f21e527480e68e05913e5fa09fb5fa9d042e04 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 ascii fallback
Needs spliting.
---
dlls/odbc32/proxyodbc.c | 40 +++++++++++++++++++++++++++++++++++-----
1 file changed, 35 insertions(+), 5 deletions(-)
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
index 81f5cb9a799..e965a86bf15 100644
--- a/dlls/odbc32/proxyodbc.c
+++ b/dlls/odbc32/proxyodbc.c
@@ -6411,7 +6411,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;
}
@@ -6577,7 +6583,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;
}
@@ -6780,7 +6791,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 */
@@ -7978,7 +8002,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.47.2