wine-staging/patches/odbc32-fixes/0008-odbc32-SQLBindParameter-handle-fallback-function.patch
2024-08-13 11:58:33 +10:00

47 lines
1.7 KiB
Diff

From 1b2068b8f8adc036d0c2b9cda00c37cd55330b41 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] odbc32: SQLBindParameter handle fallback function
---
dlls/odbc32/proxyodbc.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
index 8f53fa71668..7099027c2b4 100644
--- a/dlls/odbc32/proxyodbc.c
+++ b/dlls/odbc32/proxyodbc.c
@@ -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)
+ {
+ /* 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;
+
+ /* 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;;;
+
+ return stmt->hdr.win32_funcs->SQLBindParam( stmt->hdr.win32_handle, param, value_type, param_type,
+ size, digits, value, len);
+ }
+
return SQL_ERROR;
}
--
2.43.0