Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Can a File Still be In Use after Close All
Message
From
15/10/2003 19:53:04
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
To
15/10/2003 09:47:28
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00838860
Message ID:
00839080
Views:
20
Check the CachedOpenLimit registry entry on the server.

For more info, see: Server Optimization in RFCB Caching Q126026

>The code below is a trivial routine to pack all the files in a given directory. It works fine on my own machine, but if I install the program on a remote machine it falls over telling me that one of the files is in use. Given the first line (close all), I am at a loss to understand how this is possible or what I can do about it, although, as you will see, I have attempted a bodge to trap it.
>
>Any theories?
>
>CODE SNIPPET
>close all
>numfiles=ADIR(myarray,'*.dbf')
>SET SAFETY OFF
>FOR ncount=1 TO numfiles
> filename=TRIM(myarray(ncount,1)) && renamed array - third attempt
> IF USED(filename)
>&& set bodge ON. This should never happen because we closed ALL above
>&& but happens anyway in remote compiled version. Bodge off
> USE IN (filename) && this doesn't work either!
> endif
> USE (filename) EXCLUSIVE
> WAIT WINDOW 'Removing Deleted Records from '+filename nowait
> pack
>ENDFOR
>wait clear
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform