Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A strange 'File in Use by Another' error
Message
From
20/05/1999 12:28:09
 
 
To
20/05/1999 08:45:40
David Abraham
David Abraham & Associates, Inc.
New York City, New York, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00220768
Message ID:
00220916
Views:
32
>ndxname = 'X' + SYS(3)
>INDEX ON [fldname] TO &ndxname
>
>Look familiar? This is how we FP'ers have created a new filename since the beginning of time. And I am having a 'File in use by another' error come up on my client's app, sometimes. Actually not sometimes, but always on my client's PC's which run Win98, the error does not happen on the one PC in the store that runs Win95. However, it does not occur on my development PC, which runs Win98 too. It does NOT make sense to me that this is the operative difference but I have nothing else to go on. Any ideas?

SYS(3) isn't guarenteed to create a unique name; SYS(2015) will, though (but it won't be DOS file name compatible necessarily). I'd also change you code to:

INDEX on &fldname TO (ndxname)

assuming that fldname contains the name of the field (or the index expression; it can contain a complex expression using macroexpansion) to use to create the index, and ndxname contains the name of the index file to create as you've indicated, using name substitution rather than relying on macroexpansion for the name of the file.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform