at first, you have only one column (according to your query text)
second, you set position only on first record (query.next())
and then try to read data from non-existed columns (you have only one column!)
so, try this code
Qt Code:
.... while (query.next()) { .... } ....To copy to clipboard, switch view to plain text mode
read for detailes QSqlQuery::next





Reply With Quote
Bookmarks