2025-09-08 09:54:01 +10:00
|
|
|
From 6a082863d0f060d429833e663a12f1fcea2646b7 Mon Sep 17 00:00:00 2001
|
2025-04-26 12:34:21 +10:00
|
|
|
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
|
|
|
Date: Sat, 26 Apr 2025 19:18:17 +1000
|
2025-05-05 09:07:19 +10:00
|
|
|
Subject: [PATCH] odbc32: Various ANSI fallback
|
2025-04-26 12:34:21 +10:00
|
|
|
|
|
|
|
Needs spliting.
|
|
|
|
---
|
2025-05-05 09:07:19 +10:00
|
|
|
dlls/odbc32/proxyodbc.c | 31 +++++++++++++++++++++++++++----
|
|
|
|
1 file changed, 27 insertions(+), 4 deletions(-)
|
2025-04-26 12:34:21 +10:00
|
|
|
|
|
|
|
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
2025-09-08 09:54:01 +10:00
|
|
|
index bfec7c0aa18..299d4eb2580 100644
|
2025-04-26 12:34:21 +10:00
|
|
|
--- a/dlls/odbc32/proxyodbc.c
|
|
|
|
+++ b/dlls/odbc32/proxyodbc.c
|
2025-09-08 09:54:01 +10:00
|
|
|
@@ -6487,7 +6487,13 @@ static SQLRETURN get_connect_attr_win32_w( struct connection *con, SQLINTEGER at
|
2025-04-26 12:34:21 +10:00
|
|
|
{
|
|
|
|
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)
|
|
|
|
+ {
|
2025-04-28 11:04:44 +10:00
|
|
|
+ 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;
|
2025-04-26 12:34:21 +10:00
|
|
|
+ }
|
|
|
|
return SQL_ERROR;
|
|
|
|
}
|
|
|
|
|
2025-09-08 09:54:01 +10:00
|
|
|
@@ -6653,7 +6659,12 @@ static SQLRETURN get_diag_field_win32_w( SQLSMALLINT type, struct object *obj, S
|
2025-04-26 12:34:21 +10:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2025-09-08 09:54:01 +10:00
|
|
|
@@ -6856,7 +6867,13 @@ static SQLRETURN set_connect_attr_win32_w( struct connection *con, SQLINTEGER at
|
2025-04-26 12:34:21 +10:00
|
|
|
{
|
|
|
|
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)
|
|
|
|
+ {
|
2025-04-28 11:04:44 +10:00
|
|
|
+ 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;
|
2025-04-26 12:34:21 +10:00
|
|
|
+ }
|
|
|
|
else if(con->hdr.win32_funcs->SQLSetConnectOptionW)
|
|
|
|
{
|
|
|
|
/* ODBC v2 */
|
2025-09-08 09:54:01 +10:00
|
|
|
@@ -8095,7 +8112,13 @@ static SQLRETURN set_desc_field_win32_w( struct descriptor *desc, SQLSMALLINT re
|
2025-04-26 12:34:21 +10:00
|
|
|
{
|
|
|
|
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)
|
|
|
|
+ {
|
2025-04-28 11:04:44 +10:00
|
|
|
+ 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;
|
2025-04-26 12:34:21 +10:00
|
|
|
+ }
|
|
|
|
return SQL_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2025-09-08 09:54:01 +10:00
|
|
|
2.50.1
|
2025-04-26 12:34:21 +10:00
|
|
|
|