mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
|
From 1d3f665c4081f2675864b98962b4d8a611564063 Mon Sep 17 00:00:00 2001
|
||
|
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||
|
Date: Sat, 10 Aug 2024 14:38:54 +1000
|
||
|
Subject: [PATCH] odbc32: Use SQLAllocHandle to allocated a STMT handle
|
||
|
|
||
|
---
|
||
|
dlls/odbc32/proxyodbc.c | 13 +++++++++----
|
||
|
1 file changed, 9 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||
|
index 70837003b69..0fa0102f2bb 100644
|
||
|
--- a/dlls/odbc32/proxyodbc.c
|
||
|
+++ b/dlls/odbc32/proxyodbc.c
|
||
|
@@ -515,12 +515,17 @@ static SQLRETURN alloc_stmt_unix( struct handle *con, struct handle *stmt )
|
||
|
|
||
|
static SQLRETURN alloc_stmt_win32( struct handle *con, struct handle *stmt )
|
||
|
{
|
||
|
- if (con->win32_funcs->SQLAllocStmt)
|
||
|
+ SQLRETURN ret = SQL_ERROR;
|
||
|
+ if (con->win32_funcs->SQLAllocHandle)
|
||
|
{
|
||
|
- SQLRETURN ret = con->win32_funcs->SQLAllocStmt( con->win32_handle, &stmt->win32_handle );
|
||
|
- if (SUCCESS( ret )) stmt->win32_funcs = con->win32_funcs;
|
||
|
+ ret = con->win32_funcs->SQLAllocHandle( SQL_HANDLE_STMT, con->win32_handle, &stmt->win32_handle );
|
||
|
}
|
||
|
- return SQL_ERROR;
|
||
|
+ else if (con->win32_funcs->SQLAllocStmt)
|
||
|
+ {
|
||
|
+ ret = con->win32_funcs->SQLAllocStmt( con->win32_handle, &stmt->win32_handle );
|
||
|
+ }
|
||
|
+ if (SUCCESS( ret )) stmt->win32_funcs = con->win32_funcs;
|
||
|
+ return ret;
|
||
|
}
|
||
|
|
||
|
/*************************************************************************
|
||
|
--
|
||
|
2.43.0
|
||
|
|