Files
wine-staging/patches/odbc32-fixes/0030-odbc32-SQLPrepareW-add-ascii-fallback.patch
Alistair Leslie-Hughes 42a307df67 Updated odbc32-fixes patchset
More support for the PostgreSQL ODBC ascii driver.
2025-05-01 08:42:13 +10:00

37 lines
1.3 KiB
Diff

From fbc17da7bbb48155d2fe1225f159a2b50b7aaf65 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 1 May 2025 08:10:04 +1000
Subject: [PATCH] odbc32: SQLPrepareW add ascii fallback
---
dlls/odbc32/proxyodbc.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
index 799ea5accf2..0fed17640c1 100644
--- a/dlls/odbc32/proxyodbc.c
+++ b/dlls/odbc32/proxyodbc.c
@@ -6199,10 +6199,17 @@ static SQLRETURN prepare_unix_w( struct statement *stmt, SQLWCHAR *statement, SQ
static SQLRETURN prepare_win32_w( struct statement *stmt, SQLWCHAR *statement, SQLINTEGER len )
{
+ SQLRETURN ret = SQL_ERROR;
+
if (stmt->hdr.win32_funcs->SQLPrepareW)
return stmt->hdr.win32_funcs->SQLPrepareW( stmt->hdr.win32_handle, statement, len );
- if (stmt->hdr.win32_funcs->SQLPrepare) FIXME( "Unicode to ANSI conversion not handled\n" );
- return SQL_ERROR;
+ if (stmt->hdr.win32_funcs->SQLPrepare)
+ {
+ SQLCHAR *statementA = (SQLCHAR*)strdupWtoA( statement );
+ ret = stmt->hdr.win32_funcs->SQLPrepare( stmt->hdr.win32_handle, statementA, len );
+ free(statementA);
+ }
+ return ret;
}
/*************************************************************************
--
2.47.2