Hi folks,
I have a weird problem with SQLite in Qt.
First, here is my code:
query.prepare("INSERT INTO details (parentid,value) VALUES(?,?)");
query.bindValue(0,parenid);
query.bindValue(1,value);
query.exec();
QSqlQuery query;
query.prepare("INSERT INTO details (parentid,value) VALUES(?,?)");
query.bindValue(0,parenid);
query.bindValue(1,value);
query.exec();
To copy to clipboard, switch view to plain text mode
Sometimes this query doesn't save the entry in the database. The value is then available for an SELECT Statement while the program is running but if I close the program and start it again the value isn't there anymore. I'm not using a memory database and other statements are saved in the DB. The weird thing ist, that sometimes the query saves the entry and sometimes it doesn't.
So does anybody know how to solve this?
Bookmarks