jan_sc


hi all,

is there a tool that allows me to find who does actually locking a particular dbf file

thanks.

regards.




Re: file access is denied (tools needed)

mathmo


Doubt it ! (though if you record everybody who is accessing it...) Though if there is such a tool that would be very handy for me to for the file locking that I'm coming across from time to time.





Re: file access is denied (tools needed)

Naomi Nosonovsky

There is a FAQ describing this technique on a site you need to be registered first to access it.

Works for Windows XP and Windows 2000.

http://www.universalthread.com/wconnect/wc.dll 2,84,14,7896






Re: file access is denied (tools needed)

MarciaAkins

jan_sc wrote:

is there a tool that allows me to find who does actually locking a particular dbf file

thanks.

What is it that you are actually trying to accomplish here

Are you trying to trap for the error to prevent your program from crashing

If this is the case, just wrap the USE command in a TRY/CATCH to prevent a crashing error.






Re: file access is denied (tools needed)

CetinBasoz

File access is denied do not necessarily occur for someone else is using it. Nobody might be using but you don't have access rights either.

There is no built-in mecahism to check locks at record level or table level. However there are different techniques to check who is holding the table(s) from being used exclusive ( in case of maintanence ) or locked a particular record. There is no API that works cross platform with different windows versions that VFP supports, neither reliable APIs that work for a given OS like WIndows XP/NT/2K etc. (read it I have never seen one API code that reliably works on say all XP Pro installations - maybe you're luckier than me).

The main question is do you need it Generally the answer is no ( kicking users out for maintenance is one place for it, watchdog implementation like that of Novell's work quite well for me ). In a lot of cases a single "set exclusive off" on entry is the cure of many problems.