How perform SQLite query with a data reader without locking database?
I am using System.Data.Sqlite to access SQLite database in C#. I have a query which must read through rows in a table. While iterating through the rows and while the reader is open, certain SQL updates must be performed. I am running into a "database is locked" exception. The SQLite documentation states: When a process wants to read from a database file, it followed the following sequence of steps: Open the database file and obtain a SHARED lock. The documentation further states about "SHARED" locking: The database may be read but not written. Any number of processes can hold SHARED locks at