On Thu, Apr 16, 2015 at 11:10 AM, Janke, Julian <julian.janke at capgemini.com>
wrote:

> I want to change the journal mode of a database to WAL. So I did the
> following:
>
> rc = sqlite3_open(dbPath, &db);
> rc = sqlite3_exec(db, "PRAGMA journal_mode=WAL;", testCallbackPrint, 0,
> &zErrMsg);
> [?]
> sqlite3_close(db);
>
> Unfortunately, after these lines, the journal mode is not changed. The
> sqlite3_exec function returns SQLITE_OK (0),
>

>From http://www.sqlite.org/pragma.html#pragma_journal_mode:
The WAL journaling mode is persistent; after being set it stays in effect
across multiple database connections and after closing and reopening the
database

And once set, you cannot change it I believe. You decide on WAL or non-WAL
before creating any object in the DB, and from that point on, you can't
change it. --DD

Reply via email to