Home:ALL Converter>How to fetch row at given index from QSqlQuery

How to fetch row at given index from QSqlQuery

Ask Time:2014-10-27T17:22:09         Author:Harikesh

Json Formatter

I am learning QT and using QSqlQuery to fetch data from database.

I have read this documentation. I know using next() function we can iterate through rows of QSqlQuery and using value(int col) function we can get data from current row.

But i dont know how to fetch row at particular index without using next() function.

Author:Harikesh,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/26584376/how-to-fetch-row-at-given-index-from-qsqlquery
yy