QSqlQuery and error handing ?
Solved
General and Desktop
-
I perform a query with:
QSqlQuery query(strQuery); QSqlError err = query.lastError();
What is the correct way to test 'QSqlError' to see if there is an error or not? I see that QSqlError has a member called, NoError. How do I test this?
Looking at .number() I can see a value is returned, is there any lookup or list for these values?
-
Hi
if ( query.lastError().type() == QSqlError::NoError ) { qDebug() << "no error"; }
-