Hello,
I want to use the journal mode 'WAL', but every time I try to set the journal mode, it results in an SQLiteException and the application crashes. The same applies to setting any other journal mode.
For the sake of testing, I created a new XF project with the 'Master-Detail' template and installed the 'sqlite-net-pcl' nuget (everything on the newest version). Even then, I am not able to set the journal mode without the exception occuring. I tested it with iOS and Android on emulators as well as real devices. None seem to work.
I couldn't find any other people with the same issue, so I was wondering, if I am just doing something wrong?
Below you can find the code I used to set the journal mode. It only serves for testing purpose.
using SQLite;
using System;
using System.IO;
namespace App1
{
public class Database
{
public Database()
{
var path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "TestSQLite.db3");
// -> SQLite.SQLiteException: Row
var connection = new SQLiteConnection(path, SQLiteOpenFlags.ReadWrite | SQLiteOpenFlags.Create);
connection.Execute("PRAGMA journal_mode = WAL");
// just in case, cmd also doesn't work
var cmd = connection.CreateCommand("PRAGMA journal_mode = WAL");
cmd.ExecuteNonQuery();
}
}
}