Hi there!

Currently, we are using SQLite as our application file format for a Windows 
7/C#/System.Data.SQLite based desktop application. We only allow one instance 
to open the file by running "set locking_mode=EXCLUSIVE;BEGIN EXCLUSIVE;COMMIT" 
when connecting to the database.

This all works fine, however a user can still open Windows Explorer and copy 
paste a file with the same name but different content (e.g. an empty file) over 
an existing, exclusively locked database. From what I found out with the 
OpenedFilesView tool, SQLite seems to open the file with SHARED_WRITE, which 
explains why *any* process can overwrite the contents.

Is there an easy way of configuring / changing this so that SHARED_WRITE is not 
acquired? Will SQLite even function? Is it just easier to create a hidden copy 
and work on that?

Thanks for the advice
Fabian

Reply via email to