Originally Posted by saa7_go You can use QSqlQuery::value(int index) to get the value of field index in the current record. Qt Code: Switch view query.exec("SELECT ....");query.next();qDebug() << query.value(0).toInt() << query.value(1).toString(); // just an example query.exec("SELECT ...."); query.next(); qDebug() << query.value(0).toInt() << query.value(1).toString(); // just an example To copy to clipboard, switch view to plain text mode The problem is that I need to use real field names, not indexes.
query.exec("SELECT ....");query.next();qDebug() << query.value(0).toInt() << query.value(1).toString(); // just an example
query.exec("SELECT ...."); query.next(); qDebug() << query.value(0).toInt() << query.value(1).toString(); // just an example
Forum Rules
Bookmarks