From 822114e976d7c6644f060ac366c08c92da1a4779 Mon Sep 17 00:00:00 2001 From: Bill King Date: Wed, 29 Apr 2009 14:26:29 +1000 Subject: Try and clean up ODBC 64/32 bit type disparity It seems that after approx version 2.7.0, microsoft changed the ODBC types of certain functions, to cater for 64bit architectures. This tries to be a little bit smarter about which types are used in which places. --- src/sql/drivers/odbc/qsql_odbc.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp index 2a83fe6..4e90777 100644 --- a/src/sql/drivers/odbc/qsql_odbc.cpp +++ b/src/sql/drivers/odbc/qsql_odbc.cpp @@ -70,18 +70,16 @@ QT_BEGIN_NAMESPACE #endif // newer platform SDKs use SQLLEN instead of SQLINTEGER -#if defined(SQLLEN) || defined(Q_OS_WIN64) +//#if defined(SQLLEN) || defined(Q_OS_WIN64) +#if ODBCVER >= 0x0270 # define QSQLLEN SQLLEN -#else -# define QSQLLEN SQLINTEGER -#endif - -#if defined(SQLULEN) || defined(Q_OS_WIN64) # define QSQLULEN SQLULEN #else +# define QSQLLEN SQLINTEGER # define QSQLULEN SQLUINTEGER #endif + static const int COLNAMESIZE = 256; //Map Qt parameter types to ODBC types static const SQLSMALLINT qParamType[4] = { SQL_PARAM_INPUT, SQL_PARAM_INPUT, SQL_PARAM_OUTPUT, SQL_PARAM_INPUT_OUTPUT }; -- cgit v0.12