PDA

View Full Version : SQLite plugin - Dump entire table to a label similar.



Gavin Harper
22nd August 2010, 21:58
Hello,

This is my first serious project in Qt and I am hitting a minor roadblock on two things (Though issue number two is for a separate thread!).

Essentially, I have a form set up that it takes data from two lineEdits and puts them in an SQLite database. This works as expected though getting the information back out is a challenge.

I am currently sending a query of "select * from table;" by the query.exec(); but I only get the first entry.

If anyone has any pointers or relevant documentation, I would greatly appreciate it.

Thank you

Lykurg
22nd August 2010, 22:08
QSqlQuery::next() and in the detailed section you will find good examples. And please use the newbie section and try to lookup yourself next time.

Gavin Harper
23rd August 2010, 05:21
Appreciated.

I was using that, but incorrectly it seems!

Thank you!

saa7_go
23rd August 2010, 05:52
can you post some codes where you execute QSqlQuery::next().

Gavin Harper
23rd August 2010, 09:51
Sadly not anymore... I used the link above and have it working now!

The "Thank you" above was genuine, haha!

saa7_go
23rd August 2010, 10:20
Ups. My bad. ;)