[PATCH 0/2] MR10564: odbc32: Add SQLGetStmtOption() -> SQLGetStmtAttr() fallback for a few options.
Same use case as with !10539. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10564
From: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> --- dlls/odbc32/proxyodbc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index 066e9c14064..e3cf98f48bb 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -3325,6 +3325,19 @@ static SQLRETURN get_stmt_option_win32( struct statement *stmt, SQLUSMALLINT opt { if (stmt->hdr.win32_funcs->SQLGetStmtOption) return stmt->hdr.win32_funcs->SQLGetStmtOption( stmt->hdr.win32_handle, option, value ); + + if (stmt->hdr.win32_funcs->SQLGetStmtAttrW) + { + switch (option) + { + case SQL_QUERY_TIMEOUT: + case SQL_MAX_LENGTH: + return stmt->hdr.win32_funcs->SQLGetStmtAttrW( stmt->hdr.win32_handle, option, value, 0, NULL ); + default: + FIXME("Unsupported option %d.\n", option); + } + } + return SQL_ERROR; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10564
From: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> --- dlls/odbc32/proxyodbc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index e3cf98f48bb..b6742c1f370 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -4215,6 +4215,19 @@ static SQLRETURN set_stmt_option_win32( struct statement *stmt, SQLUSMALLINT opt { if (stmt->hdr.win32_funcs->SQLSetStmtOption) return stmt->hdr.win32_funcs->SQLSetStmtOption( stmt->hdr.win32_handle, option, value ); + + if (stmt->hdr.win32_funcs->SQLSetStmtAttrW) + { + switch (option) + { + case SQL_QUERY_TIMEOUT: + case SQL_MAX_LENGTH: + return stmt->hdr.win32_funcs->SQLSetStmtAttrW( stmt->hdr.win32_handle, option, (SQLPOINTER)value, 0 ); + default: + FIXME("Unsupported option %d.\n", option); + } + } + return SQL_ERROR; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10564
This merge request was approved by Hans Leidekker. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10564
This merge request was approved by Piotr Caban. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10564
participants (4)
-
Hans Leidekker (@hans) -
Nikolay Sivov -
Nikolay Sivov (@nsivov) -
Piotr Caban (@piotr)