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");
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("insert into contact(name,tell) values('a','b')"); 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” -
Hi,
Please don't post the same question in multiple sub-forum, one is enough
"Duplicate":http://qt-project.org/forums/viewthread/38452/
-
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