SQLite concurrent access

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
acton
Posts: 2
Joined: Sat 21 May 2011 02:54

SQLite concurrent access

Post by acton » Sat 21 May 2011 03:00

does dotConnect for SQLite support concurrent access? Thank you.

SQLite don't support concurrent write. But dbExpress driver for SQLite have concurrent access feature. So I ask.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 23 May 2011 14:53

Please refer to http://www.sqlite.org/faq.html#q5:
SQLite allows multiple processes to have the database file open at once, and for multiple processes to read the database at once. When any process wants to write, it must lock the entire database file for the duration of its update. But that normally only takes a few milliseconds. Other processes just wait on the writer to finish then continue about their business.
Concerning dotConnect for SQLite, please pay attention to the following connection string parameters:
1) "Locking=Normal;";
2) if you want to use "Read Uncommitted=True;", you should also call static SQLiteConnection.EnableSharedCache() before opening connections: http://www.sqlite.org/c3ref/enable_shared_cache.html.

Post Reply