- From http://www.sqlite.org/pragma.html:
Database locks obtained by a connection in EXCLUSIVE mode may be released either by closing the database connection,
or by setting the locking-mode back to NORMAL using this pragma and then accessing the database file (for read or write).
Simply setting the locking-mode to NORMAL is not enough - locks are not released until the next time the database file is accessed.
~SQLiteDatabase()
{
sqlite3_exec(db, "PRAGMA locking_mode=normal", null, null, null);
+ // "Simply setting the locking-mode to NORMAL is not enough - locks are not released until the next time the database file is accessed."
+ sqlite3_exec(db, "SELECT COUNT(*) from eda_table_fields", null, null, null);
sqlite3_close(db);
}