From 18055b3c3fe50337ee1af819839694674bdfb3ff Mon Sep 17 00:00:00 2001 From: Bill King Date: Thu, 2 Jul 2009 15:00:03 +1000 Subject: Tinyint is unsigned, force it to such. Tinyint only supports 0-255, so mark it as unsigned despite sign flag, which have the time is inverted/wrong. --- src/sql/drivers/odbc/qsql_odbc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp index e18a9eb..4f358ec 100644 --- a/src/sql/drivers/odbc/qsql_odbc.cpp +++ b/src/sql/drivers/odbc/qsql_odbc.cpp @@ -252,9 +252,11 @@ static QVariant::Type qDecodeODBCType(SQLSMALLINT sqltype, const T* p, bool isSi case SQL_SMALLINT: case SQL_INTEGER: case SQL_BIT: - case SQL_TINYINT: type = isSigned ? QVariant::Int : QVariant::UInt; break; + case SQL_TINYINT: + type = QVariant::UInt; + break; case SQL_BIGINT: type = isSigned ? QVariant::LongLong : QVariant::ULongLong; break; -- cgit v0.12