Results 1 to 2 of 2

Thread: OUT OF MEMORY - Error while working with sqlite

  1. #1
    Join Date
    Sep 2009
    Posts
    54
    Thanks
    4
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default OUT OF MEMORY - Error while working with sqlite

    Dear Friends,
    I am gettting OUT OF MEMORY error while working with sqlite. while executing the following sql statement
    Qt Code:
    1. QSqlQuery q(db->cn);
    2. q=db->SelectQuery("SELECT name FROM sqlite_master WHERE name= 'tablename'");//im getting error while executing this stament
    To copy to clipboard, switch view to plain text mode 

    i had used query like this in many part of my project. i am getting error while executing the above query in particular part
    Qt Code:
    1. out of memory Unable to execute statement
    To copy to clipboard, switch view to plain text mode 

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

    Regards
    askar

  2. #2
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: OUT OF MEMORY - Error while working with sqlite

    your problem is probably something else.

    why don't you use QSqlQuery like this:

    Qt Code:
    1. QSqlQuery query("SELECT country FROM artist");
    2. while (query.next()) {
    3. QString country = query.value(0).toString();
    4. doSomething(country);
    5. }
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. QHash : Virtual memory not released
    By jbenoit in forum Qt Programming
    Replies: 16
    Last Post: 14th November 2009, 16:35
  2. Changing memory allocation managment ( QT 4.4.3 )
    By Link130 in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 20th October 2009, 09:44
  3. How can I send a SQLite :memory: database connection ?
    By georgep in forum Qt Programming
    Replies: 4
    Last Post: 20th July 2009, 12:07
  4. Memory debugging in windows
    By txandi in forum Qt Programming
    Replies: 3
    Last Post: 20th February 2009, 13:45
  5. working with SQLite
    By bhs-ittech in forum Qt Programming
    Replies: 3
    Last Post: 15th September 2008, 07:51

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.