Re: File is in use
- From: Jan Derk <none@xxxxxxxxx>
- Date: Wed, 22 Jun 2005 00:47:25 +0200
Peter Morris [Droopy eyes software] wrote:
I have a report which passes parameters to a calculation routine and receives a set of results. The report executes this routine many times, the routine takes about 100 milliseconds to run.
For tracking purposes, every time I run the routine I write the parameters to a text file using a TStringList. My problem is that rarely I get an exception from the SaveToFile method telling me that the file is in use.
Has anyone else experienced this? If so do you have a solution?
I have seen this happening due to anit-virus software locking the file for a tiny moment, but long enough for your software to fail.
Resolution #1: Burn down the Symantec headquarters.
Resolution #2: Retry accessing the file after a short moment. Generally the anti-virus S/W unlocks the file when its done.
The file extension has an influence. *.dat file for example get checked, thus locked, by Norton, but *.weirdextension often isn't. So often changing the file extension helps. It does not hurt either to not release the file lock while you need it, preventing any other application from grabbing it.
Jan Derk .
- References:
- File is in use
- From: Peter Morris [Droopy eyes software]
- File is in use
- Prev by Date: Re: Company concered with "One-man-band".
- Next by Date: Re: Please read Mr. Kaster, Mr. Intersimone, TeamB members and the rest of all .Net friends !!!
- Previous by thread: File is in use
- Next by thread: Re: File is in use
- Index(es):
Relevant Pages
|