Using following code:
Code: Select all
SQLiteConnection conn = SQLiteConnection(ConnectionString)
conn.Open();
SQLiteTransaction trans = conn.BeginTransaction()
SQLiteCommand cmd = new SQLiteCommand("UPDATE t SET NAME='a' WHERE ID = 1"; conn);
cmd.CommandType = CommandType.Text;
cmd.Transaction = trans;
cmd.ExecuteNonQuery();
cmd = new SQLiteCommand("UPDATE t SET NAME='b' WHERE ID = 2"; conn);
cmd.CommandType = CommandType.Text;
cmd.Transaction = trans;
cmd.ExecuteNonQuery();
trans.Commit();
I've tried set different types of TransactionMode (exclusive) or IsolationLevel (read uncommited) without success. Also changing Journal_Mode to something different (e.g. TRUNCATE) doesn't help.
Also running transaction only with INSERT statement works properly. The problem occurs only if changing data (UPDATE, DELETE, REPLACE) when journal file is created.