mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
215e6efd27
Reordered the Alloc/Free handle patches together. Fixed an issue with the Driver patchset (Thanks Daniel Lehman)
53 lines
2.2 KiB
Diff
53 lines
2.2 KiB
Diff
From d3e972d613def74c2b59757ca25653303cb652bf Mon Sep 17 00:00:00 2001
|
|
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
|
Date: Fri, 12 Jul 2024 14:40:32 +1000
|
|
Subject: [PATCH 08/15] odbc32: SQLBindParameter handle fallback function
|
|
|
|
---
|
|
dlls/odbc32/proxyodbc.c | 27 ++++++++++++++++++++++++++-
|
|
1 file changed, 26 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
|
index 6eb15687f92..462661f43de 100644
|
|
--- a/dlls/odbc32/proxyodbc.c
|
|
+++ b/dlls/odbc32/proxyodbc.c
|
|
@@ -3570,9 +3570,34 @@ SQLRETURN WINAPI SQLBindParameter(SQLHSTMT StatementHandle, SQLUSMALLINT Paramet
|
|
}
|
|
else if (handle->win32_handle)
|
|
{
|
|
- ret = handle->win32_funcs->SQLBindParameter( handle->win32_handle, ParameterNumber, InputOutputType, ValueType,
|
|
+ if (handle->win32_funcs->SQLBindParameter)
|
|
+ {
|
|
+ ret = handle->win32_funcs->SQLBindParameter( handle->win32_handle, ParameterNumber, InputOutputType, ValueType,
|
|
ParameterType, ColumnSize, DecimalDigits, ParameterValue,
|
|
BufferLength, StrLen_or_Ind );
|
|
+ }
|
|
+ else if(handle->win32_funcs->SQLBindParam)
|
|
+ {
|
|
+ /* ODBC v2 */
|
|
+ /* TODO: Make function */
|
|
+ if(ValueType == SQL_C_TYPE_TIME)
|
|
+ ValueType = SQL_C_TIME;
|
|
+ else if(ValueType == SQL_C_TYPE_DATE)
|
|
+ ValueType = SQL_C_DATE;
|
|
+ else if(ValueType == SQL_C_TYPE_TIMESTAMP)
|
|
+ ValueType = SQL_C_TIMESTAMP;
|
|
+
|
|
+ /* TODO: Make function */
|
|
+ if (ParameterType == SQL_TIME)
|
|
+ ParameterType = SQL_TYPE_TIME;
|
|
+ else if (ParameterType == SQL_DATE)
|
|
+ ParameterType = SQL_TYPE_DATE;
|
|
+ else if (ParameterType == SQL_TIMESTAMP)
|
|
+ ParameterType = SQL_TYPE_TIMESTAMP;;;
|
|
+
|
|
+ ret = handle->win32_funcs->SQLBindParam(handle->win32_handle, ParameterNumber, ValueType, ParameterType,
|
|
+ ColumnSize, DecimalDigits, ParameterValue, StrLen_or_Ind);
|
|
+ }
|
|
}
|
|
|
|
TRACE("Returning %d\n", ret);
|
|
--
|
|
2.43.0
|
|
|