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

  • 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");
    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”

  • Lifetime Qt Champion


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


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

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

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.