I want to use sqlite as a db on a shared network drive (windows) (user would 
map the network drive to say T:). I read the documentation section "File 
Locking And Concurrency In SQLite Version 3" 

Where following is clearly mentioned:
"SQLite uses POSIX advisory locks to implement locking on Unix. On Windows it 
uses the LockFile(), LockFileEx(), and UnlockFile() system calls. SQLite 
assumes that these system calls all work as advertised. If that is not the 
case, then database corruption can result. One should note that POSIX advisory 
locking is known to be buggy or even unimplemented on many NFS implementations 
(including recent versions of Mac OS X) and that there are reports of locking 
problems for network filesystems under Windows. Your best defense is to not use 
SQLite for files on a network filesystem."

My question: Is it possible to verify if the network drive on which the DB is 
place can be used? What I would like to do is when user tries to load the db 
(sqlite3_open) first run the verification and inform the user that database is 
placed on a drive that does not support the locking mechanism required by our 

I am using sqlite-3.7.2

Prakash Bande
Altair Engg. Inc. 
Troy MI
Ph: 248-614-2400 ext 489
Cell: 248-404-0292
sqlite-users mailing list

Reply via email to