Can I use PRAGMA journal_mode=WAL with an SQLiteConnection?


#1

Hi,

Should the following command work when I’m using Xamarin?

SQLiteConnection connection = new SQLiteConnection(“Data Source=” + file + “;PRAGMA journal_mode=WAL;”);

If not does anybody have an example that does work?

Regards,

Simon


#2

Hello @sfryer

You will need to execute the PRAGMA command to enable write ahead logging as a separate command after you have created the connection, not as part of the connection string in the SQLiteConnection constructor.