Hi,
I've tried passing "PRAGMA locking_mode = EXCLUSIVE;" in my connection string but Devart doesn't like this ...
Is this expected behaviour?? If so, why deviate from the norm?
Or is there a better way to assert only one session on the database?
PRAGMA in Connection String
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
dotConnect for SQLite do not support PRAGMA connection string parameters. Try using the following:
When you use sb.Locking = LockingMode.Exclusive; then 'PRAGMA locking_mode = EXCLUSIVE' will be executed in our inner code.
Code: Select all
SQLiteConnection conn = new SQLiteConnection(@"***");
SQLiteConnectionStringBuilder sb = new SQLiteConnectionStringBuilder();
sb.Locking = LockingMode.Exclusive;
conn.ConnectionString += sb.ConnectionString;