Valhalla Legends Forums Archive | Web Development | Check if file is already open (ADODB.Recordset)

AuthorMessageTime
Spht
I have a web site that accesses an XML file each visit (and saves to it).  A problem that occurs sometimes is that the file can not be saved because it is being used (ie, two people visited site at same time), and it generates a script error.

How would I handle this situation?  I looked at the State property, but I don't think that'll tell me if another instance is accessing the file.

It would also be nice if there was a way to wait until the other instance is done accessing the file, and then save if possible.
March 16, 2007, 10:04 PM
Ersan
Handle the error and keep running the query until it works...

These things should only take milliseconds to execute, otherwise you need to stop using flat file databases.
March 18, 2007, 12:12 PM
warz
flat file ftl
March 19, 2007, 9:58 PM

Search