> * Getting rid of the old files - I'm on Windows and would need to see > the equivalent way of your Unix suggestion.
I don't think you have good options here. One option is to make continuous retries while remove() returns error. Another option I believe would be to change SQLite code to open databasses with FILE_SHARE_DELETE flag. In this case you will be able to work the same way as on Unix. Pavel On Mon, Jun 8, 2009 at 3:24 PM, Mohit Sindhwani<m...@onghu.com> wrote: > Pavel Ivanov wrote: >> I'd create another special file (maybe even database) that will keep >> information about current file that your program should be working >> with. So separate process will create new database and then update >> this file. And program will just read this file and then work with >> database mentioned in the file. If you work on Unix you even will not >> have problems deleting old databases - after updating this special >> file just unlink old database and after last file handle to it is >> closed it will be gone... >> > Hi Pavel > > Thanks for your (blazing fast) reply. I did think of something like > this though I was thinking of something like a sqlite database file to > store the recent file. That said, I was concerned about a couple of things: > * I guess there could be times when I would get database busy errors - > but that can be dealt with using a minor delay if it happens. > * Getting rid of the old files - I'm on Windows and would need to see > the equivalent way of your Unix suggestion. > > But this does seem like an interesting way to proceed! We have used > SQLite for other things in this system and it really seems faster > compared to an un-optimized instance of PostgreSQL running on the server. > > Cheers, > Mohit. > 6/9/2009 | 3:24 AM. > > > _______________________________________________ > 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