John Stanton wrote: > How about performing your backup inside an exlclusive transaction?
hm, good idea! ;) Probably that will lock the file (i.e. the database) and protect from a FileCopy, anyway: I'll try that. Thanks for the reply Marcus > > Marcus Grimm wrote: >> Hello all, >> >> is there a way to query if the database file is currently locked ? >> >> Background: >> My application may run for weeks (hopefully) and uses EXCLUSIVE >> transactions in some threads. On a daily basis I would like to copy >> the database file for backup purpose. I assume that this will fail >> when there is an exclusive transaction ongoing. It would be more >> elegant to ask sqlite rather than test against a FileCopy failure. >> >> I found the "PRAGMA locking_mode" statement, is this the one to use ? >> >> Thank you >> >> Marcus >> >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users