Hi,
When QxOrm library detects an internal error using
qx::dao functions, it returns a
QSqlError instance with a type of
QSqlError::UnknownError.
Maybe one thing I can add to the library is a number error : you would be able to get this code error using
QSqlError::number() method.
With current version of QxOrm library, you can use the
QSqlError::databaseText() method to know which error you have.
For example :
- Code: Select all
if (myDaoError.databaseText() == "[QxOrm] sql query returns no data")
{
// Here is a errNoData() error
}
Note : for more details about
QSqlError class :
http://doc.qt.nokia.com/4.7-snapshot/qsqlerror.html