QSqlQuery::isValid with MySql
Solved
3rd Party Software
-
I started to use MySql through Qt. In my table I have records which require update when some of the key numbers are already available in a relation. Therefore I have to use "CREATE" once and afterwards "UPDATE".
With a query on "SELECT * FROM table WHERE VAL=..." I am checking the existance of the reocrd. I expected that the query would deliver with isValid() == true for existing extry, but the return value is always false. I can use the size statement, which shall be 1 then. However, is there a better way for checking?
-
Thanks. The documentation for isValid is a bit ambiguous when reading as stand-alone.