2024-07-17 23:30:03 -07:00
|
|
|
From d3e972d613def74c2b59757ca25653303cb652bf Mon Sep 17 00:00:00 2001
|
2024-07-14 14:20:30 -07:00
|
|
|
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
|
|
|
Date: Fri, 12 Jul 2024 14:40:32 +1000
|
2024-07-17 23:30:03 -07:00
|
|
|
Subject: [PATCH 08/15] odbc32: SQLBindParameter handle fallback function
|
2024-07-14 14:20:30 -07:00
|
|
|
|
|
|
|
---
|
|
|
|
dlls/odbc32/proxyodbc.c | 27 ++++++++++++++++++++++++++-
|
|
|
|
1 file changed, 26 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
2024-07-17 23:30:03 -07:00
|
|
|
index 6eb15687f92..462661f43de 100644
|
2024-07-14 14:20:30 -07:00
|
|
|
--- a/dlls/odbc32/proxyodbc.c
|
|
|
|
+++ b/dlls/odbc32/proxyodbc.c
|
2024-07-17 23:30:03 -07:00
|
|
|
@@ -3570,9 +3570,34 @@ SQLRETURN WINAPI SQLBindParameter(SQLHSTMT StatementHandle, SQLUSMALLINT Paramet
|
2024-07-14 14:20:30 -07:00
|
|
|
}
|
|
|
|
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
|
|
|
|
|