SQL data extraction error
Unsolved
General and Desktop
-
I have a query like this.
query.prepare("Select * from Liste WHERE id=?"); query.addBindValue(id_); query.exec();
This query only returns 1 row of 4 columns. I checked this out.
I want to get the column values in this single row. The following procedure did not work. What should I do?The following codes did not work. and it gives an error like this.
qDebug()<<query.value(1).toString();
QSqlQuery::value: not positioned on a valid record
"" -
You have to call QSqlQuery::next() as explained in the documentation.