From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> --- 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 47af6ecc80f..9896024107d 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -6344,10 +6344,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 *)strdupWA( statement ); + ret = stmt->hdr.win32_funcs->SQLPrepare( stmt->hdr.win32_handle, statementA, len ); + free(statementA); + } + return ret; } /************************************************************************* -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10010