开发者

Not able to fetch the record if only one record is present, using QSqlite

I am trying to fetch the records from the table. I am able to get all the records except the first record.

Same way if there is only one record, then that record is also not fetched.

How could I get the only record present in my table.

I am using Qt, QSqlite and trying to get the records using QSqlQuery.next() function.

Like:

while(query.next())

What shoul开发者_开发技巧d I do to get all the records?


try to place the function QSqlQuery.first() before the while it place the db pointer to the first record so it should work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜