Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file lock

Status
Not open for further replies.
Jun 13, 2005
112
CA
hi is there anyway to prevent filelocks in foxpro?

for example we have an agent locking up a file and as a result it freezes everyone. Is there anyway to free up that file without kicking everyone out of the program in order to do this? is there any programs that will tell you which user or what station has the file locked? thanks.
 
I presume you are talking of DBF files and record locking. You may want to look into using buffered cursors or even better, creating views from your table and base your forms on those views instead of tables.

Jean
 
The file might be locked because the agent is part-way through an edit or it might be locked because the agent opened the file for exclusive use. Was this application designed as a single-user system? It might help if you could tell us what error message you are seeing.

Geoff Franklin
 
is there anyway to prevent filelocks in foxpro?
Make sure the app has SET EXCLUSIVE OFF, opens the files shared, uses buffering, you could even add a line in the CONFIG file which reads EXCLUSIVE=OFF, which wouldn't require a recompile. Several ways.
is there any programs that will tell you which user or what station has the file locked?
A lot of them. In fact, I wrote a VFP utility using API calls. If you're interested, follow the link by my signature, scroll down until you find "Open File Lister". Give it a try and see how you like it. It's form based and free, but was written using VFP 7, and it isn't an exe or app. You need VFP to run it.

-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top