From: Piotr Caban <piotr@codeweavers.com> --- dlls/odbc32/proxyodbc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index 066e9c14064..362ca8646a7 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -472,6 +472,16 @@ static struct environment *create_environment( void ) return ret; } +static struct environment *get_environment( struct object *obj ) +{ + while (1) + { + if (obj->type == SQL_HANDLE_ENV) return (struct environment *)obj; + if (!obj->parent) return NULL; + obj = obj->parent; + } +} + /************************************************************************* * SQLAllocEnv [ODBC32.002] */ @@ -6156,6 +6166,12 @@ SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNu ColumnSize, DecimalDigits, Nullable ); } + if (ret == SQL_SUCCESS && DataType && *DataType == SQL_TYPE_TIMESTAMP) + { + struct environment *env = get_environment( &stmt->hdr ); + if (env && env->attr_version == SQL_OV_ODBC2) *DataType = SQL_TIMESTAMP; + } + TRACE("Returning %d\n", ret); unlock_object( &stmt->hdr ); return ret; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10556