SQLite Forum

Opening a DB with SQLITE_OPEN_EXCLUSIVE
Login
I suspect that you expect too much from this flag. According to the documentation

<blockquote>The SQLITE_OPEN_EXCLUSIVE flag, when paired with the SQLITE_OPEN_CREATE, is used to indicate that file should always be created, and that it is an error if it already exists. It is not used to indicate the file should be opened for exclusive access.</blockquote>

There's a (still) not documented Windows-only parameter when opening with SQLITE_OPEN_URI (starting version 3034000). This was mentioned here at the forum and implemented very quickly, but still not mentioned at the docs. You should format uri something like this
  <blockquote>file:///c:/mydb.db3?exclusive=1</blockquote>