PDA

View Full Version : How to compare SqlError type?



prchakal
16th July 2013, 02:39
Hi,

Im connecting to my mysql database and i want know if the error type of db.lastError is equals to SqlError::ErrorType::NoError, but everything that i tried i got error.

Can anyone help me?

Something like this:


if (db.lastError().type() == QSqlError::ErrorType::NoError)
{
....
}

Santosh Reddy
16th July 2013, 05:51
What is wrong with this


if(db.lastError().type() == QSqlError::NoError)
{
;
}