• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 605
  • Last Modified:

Can't get exclusive access to VFP9 DBF on server

Suddenly, after four years smooth sailing,  I can't get exclusive access in VFP9 to the DBC or a DBF to modify a file in my application.
Files are on Windows Server 2008, R2. I am logging in from home to my work computer via VPN and RDC.
I did some housekeeping Thursday and modified 4 databases, getting rid of old files, using this process:
REMOVE TABLE edicases delete
REMOVE TABLE edi_recv_hd_875 delete

I did not touch one DBC, and find I can get exclusive access to it. The four I did remove tables from, I can no longer get exclusive access to for changes.

The app was in regular use Friday, with 10 users (all local). One got an error message at the start of the day "Error reading file . . .\inventory.dbc" , but not again, and multiple people used the inventory DBC with no issue.

I am 99.9% sure no one else is currently using the app, which of course would prevent me from getting exclusive access to files.
  • 2
2 Solutions
Gregory MillerGeneral ManagerCommented:
Have you tried either restarting the DB Service or restarting the server to eliminate the stray locks?
terrypba1Author Commented:
Hadn't thought of that. Like I say, there have been so few problems with Foxpro itself I haven't had to poke around the server very much. Will the server have a discrete DB Service? I won't be able to try anything until tomorrow.
FoxPro has no DB Service because it works as file server.

I suppose the error reported is "File access denied" in your case.

Refused exclusive access means file open by some other user/process. You have to look at open files list and identify the remote user which has files open. You may force disconnect of users having the file open. The first step should be to look if there isn't your past remote session still connected...

If files are open by some local process then you cannot see it and the only solution is to restart the whole server.

Error reading file means low level reading file error which is caused by damaged disk, lost network connection, or by antivirus blocking an access to the file. Antivirus should not block the file forever.
terrypba1Author Commented:
Thanks! Restarting the server did the trick.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now