Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
QSqlQueryで選択しようとすると:
select mwst, sum(in), sum(out) from costs group by mwst
エラーが発生しました: QSqlQuery::value: 有効なレコードに配置されていません
SQLite Database Browser ツールでは、select はエラーなしで実行されます。
手伝ってくれてありがとう!
有効な値でクエリを設定したことがありますbool QSqlQuery::next()か (クエリが成功した場合、結果が得られるはずです)
bool QSqlQuery::next()
お気に入り:
QSqlQuery qry("select * from table"); while (qry.next()) { qDebug() << qry.value(0).toString(); }