Page 1 of 1

SQLite concurrent access

Posted: Sat 21 May 2011 03:00
by acton
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.

Posted: Mon 23 May 2011 14:53
by Shalex
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.