pippo42
8th March 2010, 09:30
Hello!
I would need to carry out a SELECT NEXTVAL but its does not work. Here is the code.
query.exec("SELECT NEXTVAL(\'mytable\');")
query.next();
cout << query.value(0).toInt() << "\n";
I obtain an error message saying that I am not on a valid record. Indeed, query.next() and query.exec("...") return false but with a lastError().text() empty. The function query.isSelect() also returns false.
What can I do?
Thanks!
I would need to carry out a SELECT NEXTVAL but its does not work. Here is the code.
query.exec("SELECT NEXTVAL(\'mytable\');")
query.next();
cout << query.value(0).toInt() << "\n";
I obtain an error message saying that I am not on a valid record. Indeed, query.next() and query.exec("...") return false but with a lastError().text() empty. The function query.isSelect() also returns false.
What can I do?
Thanks!