fetch_by_id returns error(QSqlerror::type=4) when no data
Posted: Sun Apr 13, 2014 10:11 pm
My code likes this
If data exists, the (oci) query executes succesfully, while it returns error if no data exists and assert failed.
I don't think that sucess query without data queried shoud be regard as an sql error. Or I missed anything?
- Code: Select all
daoError = qx::dao::fetch_by_id(ap);
bCommit = !daoError.isValid();
if(!bCommit)
qDebug() << "==> DaoErr Type: " << daoError.type();
If data exists, the (oci) query executes succesfully, while it returns error if no data exists and assert failed.
I don't think that sucess query without data queried shoud be regard as an sql error. Or I missed anything?