summaryrefslogtreecommitdiffstats
path: root/src/sql/drivers/odbc
diff options
context:
space:
mode:
authorBill King <bking@trolltech.com>2009-04-16 22:54:31 (GMT)
committerBill King <bking@trolltech.com>2009-04-16 23:09:40 (GMT)
commit90bc01d2854f5c7024027c6419ae22feff57aa71 (patch)
tree60149e6df41387f32cd67bccf0f465db3cb3ff01 /src/sql/drivers/odbc
parent90d7509e4a1543e43a49bfb25dd672d824c4fde3 (diff)
downloadQt-90bc01d2854f5c7024027c6419ae22feff57aa71.zip
Qt-90bc01d2854f5c7024027c6419ae22feff57aa71.tar.gz
Qt-90bc01d2854f5c7024027c6419ae22feff57aa71.tar.bz2
Fixes long strings getting truncated by the ODBC Driver.
This test has always been wrong/confusing. Fix it to work, and make sense. Task-number: 250026 Revby: Lincoln Ramsay
Diffstat (limited to 'src/sql/drivers/odbc')
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index d6423ae..2a83fe6 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -355,7 +355,7 @@ static QString qGetStringData(SQLHANDLE hStmt, int column, int colSize, bool uni
} else {
fieldVal += QString::fromAscii(buf, rSize);
}
- if (fieldVal.size() + lengthIndicator >= colSize) {
+ if (lengthIndicator - fieldVal.size() <= 0) {
// workaround for Drivermanagers that don't return SQL_NO_DATA
break;
}