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 数据库浏览器工具中,选择运行没有错误。
感谢帮助!
您是否曾经bool QSqlQuery::next()将查询设置为有效值(如果查询成功,您应该得到结果
bool QSqlQuery::next()
喜欢:
QSqlQuery qry("select * from table"); while (qry.next()) { qDebug() << qry.value(0).toString(); }