diff options
author | Bill King <bill.king@nokia.com> | 2009-07-29 01:53:50 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2009-07-29 01:56:10 (GMT) |
commit | 2c9bf5d611cbc293851c80d4df5a46c36eac41f7 (patch) | |
tree | c6c54ef6a912e9602149cbd9113499e90ae0e19e /src/sql | |
parent | e8b1b11731b6cb52985af35d9aaaa680859f99c2 (diff) | |
download | Qt-2c9bf5d611cbc293851c80d4df5a46c36eac41f7.zip Qt-2c9bf5d611cbc293851c80d4df5a46c36eac41f7.tar.gz Qt-2c9bf5d611cbc293851c80d4df5a46c36eac41f7.tar.bz2 |
Fixes various db2 autotest issues.
Diffstat (limited to 'src/sql')
-rw-r--r-- | src/sql/drivers/db2/qsql_db2.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sql/drivers/db2/qsql_db2.cpp b/src/sql/drivers/db2/qsql_db2.cpp index 474c53d..a32b3aa 100644 --- a/src/sql/drivers/db2/qsql_db2.cpp +++ b/src/sql/drivers/db2/qsql_db2.cpp @@ -868,11 +868,13 @@ bool QDB2Result::fetch(int i) SQL_FETCH_ABSOLUTE, actualIdx); } - if (r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO) { + if (r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO && r != SQL_NO_DATA) { setLastError(qMakeError(QCoreApplication::translate("QDB2Result", "Unable to fetch record %1").arg(i), QSqlError::StatementError, d)); return false; } + else if (r == SQL_NO_DATA) + return false; setAt(i); return true; } |