Wing_Zero
18th August 2010, 03:28
Hi at all,
I'm sorry to be annoying but I'm new to qt and sometimes there is something that i really can't understand :(
Specifically, I've a QSQLITE DB and when i try to do an insert or update query (no problem with select query) just like this:
QString query = "UPDATE MovieDB SET ...etc...";
QSqlQuery queryResult= QSqlQuery (db);
queryResult.exec (query);
std::cerr << qPrintable(queryResult.lastError().text());
emit doneUp();
each time i invoke this function the time take to execute the query increase by one step.
For example if the first time I take 0.5 seconds. the second time 1.0 seconds. then 1.5 seconds, and so on...
I'm really in panic because I think there is nothing I can do to fix this...
The lag problem, unluckily, it is only a query execution fault: in fact commenting that line [ queryResult.exec (query); ] the lag disapper.
I don't know how to solve that.
I appreciate every help, and thanks is advance.
As usually sorry for my bad english :(
Gianluigi
I'm sorry to be annoying but I'm new to qt and sometimes there is something that i really can't understand :(
Specifically, I've a QSQLITE DB and when i try to do an insert or update query (no problem with select query) just like this:
QString query = "UPDATE MovieDB SET ...etc...";
QSqlQuery queryResult= QSqlQuery (db);
queryResult.exec (query);
std::cerr << qPrintable(queryResult.lastError().text());
emit doneUp();
each time i invoke this function the time take to execute the query increase by one step.
For example if the first time I take 0.5 seconds. the second time 1.0 seconds. then 1.5 seconds, and so on...
I'm really in panic because I think there is nothing I can do to fix this...
The lag problem, unluckily, it is only a query execution fault: in fact commenting that line [ queryResult.exec (query); ] the lag disapper.
I don't know how to solve that.
I appreciate every help, and thanks is advance.
As usually sorry for my bad english :(
Gianluigi