Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. SQLITE out of memory Unable to execute statement problem [SOLVED]
Forum Updated to NodeBB v4.3 + New Features

SQLITE out of memory Unable to execute statement problem [SOLVED]

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    majidkhalili
    wrote on last edited by
    #1

    hi guys i’m almost new to qt
    i just tried to use sqlite in qt but I’ve got this error
    @
    qDebug() << QSqlDatabase::drivers();
    QSqlDatabase DB = QSqlDatabase::addDatabase("QSQLITE");
    DB.setDatabaseName("/Volumes/MAJID/majid/Naminic/db0.db");
    QSqlQuery createQuery;
    qDebug()<< "open: " << DB.open();
    createQuery.exec("CREATE TABLE contact(name,tell)");
    qDebug() << createQuery.lastError().text();

    qDebug() << "insert : " << createQuery.exec&#40;"insert into contact(name,tell&#41; values('a','b'&#41;");
    qDebug() << createQuery.lastError().text();
    

    @
    and this is the out put of the debug :
    (“QSQLITE”, “QODBC3”, “QODBC”)
    open: true
    “out of memory Unable to execute statement”
    insert : false
    “out of memory Unable to execute statement”

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Please don't post the same question in multiple sub-forum, one is enough

      "Duplicate":http://qt-project.org/forums/viewthread/38452/

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        majidkhalili
        wrote on last edited by
        #3

        yeah , iknow , some one just told me that was not the best place so i post this one

        1 Reply Last reply
        0
        • M Offline
          M Offline
          majidkhalili
          wrote on last edited by
          #4

          also , this problem solved by adding clear before executing the sql command

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved