PDA

View Full Version : OUT OF MEMORY - Error while working with sqlite



Askar
24th November 2009, 09:34
Dear Friends,
I am gettting OUT OF MEMORY error while working with sqlite. while executing the following sql statement

QSqlQuery q(db->cn);
q=db->SelectQuery("SELECT name FROM sqlite_master WHERE name= 'tablename'");//im getting error while executing this stament

i had used query like this in many part of my project. i am getting error while executing the above query in particular part

out of memory Unable to execute statement

i am looking to solve this problem can anybody help me.....

Regards
askar

schnitzel
27th November 2009, 23:54
your problem is probably something else.

why don't you use QSqlQuery like this:



QSqlQuery query("SELECT country FROM artist");
while (query.next()) {
QString country = query.value(0).toString();
doSomething(country);
}