sharing data

BlitzMax Forums/BlitzMax Beginners Area/sharing data

6. Using a shared SQLite database file.


Whilst SQLite database sharing does seem to work for me here in Leopard, "How to corrupt your database files" seems to steer us away from using terms like "foolproof" when speaking about shared database files and SQLite:

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.


Which is a great pity, I think. But then, I guess mixing "foolproof" and "computers" is probably a bad move generally :-)