On 14 Jul 2014, at 11:19am, Kees Nuyt <k.n...@zonnet.nl> wrote: > On Sun, 13 Jul 2014 18:00:59 +0100, Simon Slavin <slav...@bigfraud.org> > wrote: > >> I had to explain to some users that a database >> change is not 'safe' until the database is closed. > > As far as I know, a database change is safe after a successfull COMMIT. > Commit also releases locks.
That's what the documentation says, and it's a safe way to operate if all your access to the file is via one API. Unfortunately, the drivers for many storage media lie to the operating system and do not flush changes to disk when told to. On a test system running Windows 98, using a C program writing a text file, I was able to prove that doing all the locking and flushing the documentation required still did not properly update the file on disk. However, the file was always updated by a few seconds after the file was closed so I have used that as a yardstick ever since. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users