2024-08-09 21:30:14 -07:00
|
|
|
From 83238653f67745cd9316b6140fc32a424ffa9b1b 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-08-09 21:30:14 -07:00
|
|
|
Subject: [PATCH] odbc32: SQLBindParameter handle fallback function
|
2024-07-14 14:20:30 -07:00
|
|
|
|
|
|
|
---
|
2024-08-09 21:30:14 -07:00
|
|
|
dlls/odbc32/proxyodbc.c | 22 ++++++++++++++++++++++
|
|
|
|
1 file changed, 22 insertions(+)
|
2024-07-14 14:20:30 -07:00
|
|
|
|
|
|
|
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
2024-08-09 21:30:14 -07:00
|
|
|
index 557cd212425..7105f3534ce 100644
|
2024-07-14 14:20:30 -07:00
|
|
|
--- a/dlls/odbc32/proxyodbc.c
|
|
|
|
+++ b/dlls/odbc32/proxyodbc.c
|
2024-08-09 21:30:14 -07:00
|
|
|
@@ -5052,6 +5052,28 @@ static SQLRETURN bind_parameter_win32( struct handle *handle, SQLUSMALLINT param
|
|
|
|
if (handle->win32_funcs->SQLBindParameter)
|
|
|
|
return handle->win32_funcs->SQLBindParameter( handle->win32_handle, param, io_type, value_type, param_type,
|
|
|
|
size, digits, value, buflen, len );
|
|
|
|
+ else if(handle->win32_funcs->SQLBindParam)
|
|
|
|
+ {
|
|
|
|
+ /* ODBC v2 */
|
|
|
|
+ /* TODO: Make function */
|
|
|
|
+ if (value_type == SQL_C_TYPE_TIME)
|
|
|
|
+ value_type = SQL_C_TIME;
|
|
|
|
+ else if (value_type == SQL_C_TYPE_DATE)
|
|
|
|
+ value_type = SQL_C_DATE;
|
|
|
|
+ else if (value_type == SQL_C_TYPE_TIMESTAMP)
|
|
|
|
+ value_type = SQL_C_TIMESTAMP;
|
2024-07-14 14:20:30 -07:00
|
|
|
+
|
2024-08-09 21:30:14 -07:00
|
|
|
+ /* TODO: Make function */
|
|
|
|
+ if (param_type == SQL_TIME)
|
|
|
|
+ param_type = SQL_TYPE_TIME;
|
|
|
|
+ else if (param_type == SQL_DATE)
|
|
|
|
+ param_type = SQL_TYPE_DATE;
|
|
|
|
+ else if (param_type == SQL_TIMESTAMP)
|
|
|
|
+ param_type = SQL_TYPE_TIMESTAMP;;;
|
2024-07-14 14:20:30 -07:00
|
|
|
+
|
2024-08-09 21:30:14 -07:00
|
|
|
+ return handle->win32_funcs->SQLBindParam(handle->win32_handle, param, value_type, param_type,
|
|
|
|
+ size, digits, value, len);
|
|
|
|
+ }
|
|
|
|
return SQL_ERROR;
|
|
|
|
}
|
2024-07-14 14:20:30 -07:00
|
|
|
|
|
|
|
--
|
|
|
|
2.43.0
|
|
|
|
|