Re: Weird bug with SQLite
Can you show us some code? (Maybe you create the database in RAM?)
Re: Weird bug with SQLite
Code:
bool DBWorker::OpenDB() {
db.setHostName("localhost");
db.setDatabaseName("data");
db.setUserName("maryjane");
if (db.open() == false) {
qDebug() << "Error. Database not opened.";
return false;
}
...
QUERIES KINDA "CREATE TABLE ... IF NOT EXISTS"
...
return true;
}
DBWorker::~DBWorker() {
db.close()
}
In other function i have inserting data. It's really inserting, 'cause when i'm closing application, db size are growing.
So, when i'm performing this instruction at the next application start
Code:
if (db.open() == false) {
db becomes clean.
Re: Weird bug with SQLite
In debug i found this string:
"QSqlDatabasePrivate::removeDatabase: connection 'qt_sql_default_connection' is still in use, all queries will cease to work."
But i'm closing database. What's the problem?