summaryrefslogtreecommitdiffstats
path: root/src/sql/drivers/odbc/qsql_odbc.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-06-13 15:27:52 -0500
committerTimothy Pearson <[email protected]>2012-06-13 15:27:52 -0500
commite20b43430837963d47b87d290be7a0996182c8a9 (patch)
treeed9d18d21bf731a83ca45d2e01bd866575bbb928 /src/sql/drivers/odbc/qsql_odbc.cpp
parent7295893a208dd65d616cebca19befa4cf55aa08b (diff)
downloadqt3-e20b43430837963d47b87d290be7a0996182c8a9.tar.gz
qt3-e20b43430837963d47b87d290be7a0996182c8a9.zip
Use unixODBC instead of obsolete iODBC
This closes Bug 792 Thanks to 'L0ner' for the patch!
Diffstat (limited to 'src/sql/drivers/odbc/qsql_odbc.cpp')
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index b09afd2..8b0b58b 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -61,19 +61,18 @@
#endif
// newer platform SDKs use SQLLEN instead of SQLINTEGER
-#ifdef SQLLEN
+#if defined(SQLLEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX)
# define QSQLLEN SQLLEN
#else
# define QSQLLEN SQLINTEGER
#endif
-#ifdef SQLULEN
+#if defined(SQLULEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX)
# define QSQLULEN SQLULEN
#else
# define QSQLULEN SQLUINTEGER
#endif
-
static const QSQLLEN 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 };