Valhalla Legends Archive

Programming => Web Development => Topic started by: Spht on March 16, 2007, 05:04 PM

Title: Check if file is already open (ADODB.Recordset)
Post by: Spht on March 16, 2007, 05:04 PM
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 (http://www.w3schools.com/ado/ado_ref_recordset.asp) 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.
Title: Re: Check if file is already open (ADODB.Recordset)
Post by: Ersan on March 18, 2007, 07:12 AM
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.
Title: Re: Check if file is already open (ADODB.Recordset)
Post by: warz on March 19, 2007, 04:58 PM
flat file ftl