2024-08-12 18:20:56 -07:00
|
|
|
From 1b2068b8f8adc036d0c2b9cda00c37cd55330b41 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-12 18:20:56 -07:00
|
|
|
dlls/odbc32/proxyodbc.c | 23 +++++++++++++++++++++++
|
|
|
|
1 file changed, 23 insertions(+)
|
2024-07-14 14:20:30 -07:00
|
|
|
|
|
|
|
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
2024-08-12 18:20:56 -07:00
|
|
|
index 8f53fa71668..7099027c2b4 100644
|
2024-07-14 14:20:30 -07:00
|
|
|
--- a/dlls/odbc32/proxyodbc.c
|
|
|
|
+++ b/dlls/odbc32/proxyodbc.c
|
2024-08-12 18:20:56 -07:00
|
|
|
@@ -5242,6 +5242,29 @@ static SQLRETURN bind_parameter_win32( struct statement *stmt, SQLUSMALLINT para
|
|
|
|
if (stmt->hdr.win32_funcs->SQLBindParameter)
|
|
|
|
return stmt->hdr.win32_funcs->SQLBindParameter( stmt->hdr.win32_handle, param, io_type, value_type,
|
|
|
|
param_type, size, digits, value, buflen, len );
|
|
|
|
+ else if(stmt->hdr.win32_funcs->SQLBindParam)
|
2024-08-09 21:30:14 -07:00
|
|
|
+ {
|
|
|
|
+ /* 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-12 18:20:56 -07:00
|
|
|
+ return stmt->hdr.win32_funcs->SQLBindParam( stmt->hdr.win32_handle, param, value_type, param_type,
|
2024-08-09 21:30:14 -07:00
|
|
|
+ size, digits, value, len);
|
|
|
|
+ }
|
2024-08-12 18:20:56 -07:00
|
|
|
+
|
2024-08-09 21:30:14 -07:00
|
|
|
return SQL_ERROR;
|
|
|
|
}
|
2024-07-14 14:20:30 -07:00
|
|
|
|
|
|
|
--
|
|
|
|
2.43.0
|
|
|
|
|