summaryrefslogtreecommitdiffstats
path: root/src/sql/drivers/db2/qsql_db2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sql/drivers/db2/qsql_db2.cpp')
-rw-r--r--src/sql/drivers/db2/qsql_db2.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sql/drivers/db2/qsql_db2.cpp b/src/sql/drivers/db2/qsql_db2.cpp
index 6187e6b..7bbe122 100644
--- a/src/sql/drivers/db2/qsql_db2.cpp
+++ b/src/sql/drivers/db2/qsql_db2.cpp
@@ -908,8 +908,9 @@ bool QDB2Result::fetchFirst()
SQL_FETCH_FIRST,
0);
if (r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO) {
- setLastError(qMakeError(QCoreApplication::translate("QDB2Result", "Unable to fetch first"),
- QSqlError::StatementError, d));
+ if(r!= SQL_NO_DATA)
+ setLastError(qMakeError(QCoreApplication::translate("QDB2Result", "Unable to fetch first"),
+ QSqlError::StatementError, d));
return false;
}
setAt(0);