Re: Good ways to tell why a dbf is locked?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Steve Hershoff wrote:
I'm sure everyone's seen those messages when trying to select records from a dbf- "File access is denied". Are there any good tools out there to see what process has the file locked? Are there Foxpro-specific utilities to unlock them if it comes to that? I realize the latter has some risk involved but when you're desperate...


A lot of it depends on where the file is. Also the message can come from more than one cause depending on the version of FoxPro. With (I believe) VFP8 and higher the default is to attempt to lock the header of the table as it opens it, and you will get this error if the lock fails. This same lock also occurs by default for several other functions, and if more than one is happening (or multple copies of VFP are opening the table at the same time) this error can occur.

If the files are local, look at process monitor at http://www.microsoft.com/technet/sysinternals/FileAndDisk/processmonitor.mspx which will give you that information. I'm not sure off the top of my head if it can close them if their open, but it will show you what process has them open.

If the files are on the network and you have the right priviledges, you can check the files in use on the server to see what workstation(s) have them open.

--
Cy Welch
Senior Programmer
MetSYS Inc
http://www.metsysinc.com
.



Relevant Pages

  • Re: Multiple IMAP connections to same folder
    ... it has a shared lock open on the mailbox on the server. ... So it opens another descriptor append the message to the destination, keeping the first descriptor for the open mailbox. ...
    (comp.mail.imap)
  • Re: Multiple IMAP connections to same folder
    ... it has a shared lock open on the mailbox on the server. ... So it opens another descriptor append the message to the destination, keeping the first descriptor for the open mailbox. ... It's pretty likely that your paycheck is still printed by some ancient operating system. ...
    (comp.mail.imap)
  • Re: Tech says the problem is XP, is it?
    ... It is possible for software to "lock" the drive, disabling the button, ... there's no way for it to become locked again until windows is up. ... >>tray will not open. ... it opens some times others not unless I do the fix. ...
    (microsoft.public.windowsxp.general)
  • Re: Rename file in VB 6 if not in use
    ... If by 'in use by others' you mean it's out to an application that opens ... files without maintaining a lock on them (e.g. notepad) then you have no way ... but not write to it or rename or move it. ...
    (microsoft.public.vb.general.discussion)
  • Re: Need 5VDC 100mA to 12VDC 1A converter
    ... > solenoid that opens a lock. ... > charging up an electrolytic cap. ... swapping out the solenoid isn't an option. ... Is it possible to use a R/C servo that pulls the lock? ...
    (comp.arch.embedded)