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.
精彩评论