From 83238653f67745cd9316b6140fc32a424ffa9b1b Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Fri, 12 Jul 2024 14:40:32 +1000 Subject: [PATCH] odbc32: SQLBindParameter handle fallback function --- dlls/odbc32/proxyodbc.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index 557cd212425..7105f3534ce 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -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; + + /* 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 handle->win32_funcs->SQLBindParam(handle->win32_handle, param, value_type, param_type, + size, digits, value, len); + } return SQL_ERROR; } -- 2.43.0