Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File access denied ....
Message
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00443767
Message ID:
00443790
Views:
13
>>If I issue the command "ERASE filename" and the file is in use by the system .. I get the following screen "File access denied" .. Is there a way to check if the file is in use ? I thought about using fopen but .... The real problem is, it seems Windows NT holds the file open after I issue an fclose. I close the file,try to delete it .. and it says file in use ?? Any thoughts ?>>Thanks
>>Adam
>
>Adam,
>Try this thread:
>Coding, syntax & commands Re: Finding, if file is used exclusively Thread #425134

Adam, you do not state which version of NT and whether a server is involed. If NT4 then you can ignore the following:

There is an optimization in Windows NT version 3.5 which controls whether or not a file is actually closed on the server when requested to do so by the client. This optimization is controlled by the Registry parameter, CachedOpenLimit. If the server owns an oplock on a file when the client closes it, although the server will return the Close Server Message Block (SMB) response indicating that the file has been closed, it will keep the file open locally (that is, it removes the RFCB, but maintains the LFCB and does not issue the local NtClose() request), on the assumption that the client may soon reopen the file. If the client does reopen the file, this greatly reduces the time required to respond to the request.

This optimization may fail to work correctly depending on how the file has been opened by the application. In many cases this can only be determined correctly by analyzing a trace of the network traffic between the client and the server while running the application. However, a quick test can be performed by disabling this optimization and not caching open files. To disable caching open files on the server as a test, follow these steps:
censored.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform