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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sudden problem! PDOXUSRS.LCK error appearing!

Status
Not open for further replies.

LucieLastic

Programmer
May 9, 2001
1,694
GB
hi All

My app which has been running for over 12 mths, accesses the db through a Sybase ODBC driver. I did one mod to the app, which consists of a new TQuery being added (not using ADO on this one) and now some users get

Error: Directory is controlled by other .NET file.
Directory: C:File: F:\blah\blah\PDOXUSRS.LCK

Why has this suddenly appeared and is it using a Paradox lock file??

Is this to do with the temp files that Delphi creates when its querying/editing a database?

lou

 
I don't have an answer, but I'm curious as to why the Directory and File parts of the error message have different drive letters. Maybe that's a clue to the cause of the problem?
 
hi

There are 2 problems here, I think.

I now have a theory.....correct me if I'm wrong

Delphi creates temporary .MB files to handle queries, cursors etc for DB components and I think it uses Paradox locks for all these. I think a problem can occur (on a multiuser environment), when an instance of the app crashes, it can leave these temporary files hanging. For each instance of the app, it creates files with the same names, so I think clashes can occur here. These files are named Del1.MB, Del2.MB etc.

Other problem: on a multi user environment, I needed to set the NetFileDir to a shared location in the global varable Session. As a belt and braces approach, I set the Session.PrivateDir to individual user directories, emptying these whenever they log in.

The NetFileDir needs to be set to the shared directory and will contain the PDOXUSRS.NET file.

The PrivateDir directory will contain the temporary .MB files and 2 other files: PARADOX.LCK and PDOXUSRS.LCK

I'm hoping I've solved the problem by setting those 2 Session parameters....so fingers crossed.

lou
[penguin]


 
Also realised that the .NET and .LCK files only appear when using CachedUpdates and RequestLive are true.

 
The .MB files are actually used to hold any data from memo fields in its corresponding table and aren't temporary. NET and .LCK files will appear in any directory where a .DB file is open. Once all .DB files are closed in that directory, they will/should remove themselves. The easy way to solve this problem is to just delete the offending PDOXUSRS files in the specified directory (i.e the one shown in the error), but make sure that nobody is using the system first!

You should make sure that all networked machines which use the same tables (those on your server) all point to the same PDOXUSRS files. Under the BDE you can do this using the BDE Administrator under the control panel but I am not familiar with SYBase ODBC.

Hope this helps


When your feeling down and your resistance is low, light another cigarette and let yourself go [rockband]
 
hi EricDraven

I got rid of the problem by not having a query with cached updates and requestlive set to true. I was surprised at the sudden appearance of these files 'cause I'm not using Paradox in any shape or form. Sybase is similar to MS SQLServer when it comes to connections, dba stuff and speed. I hadn't experienced the problem before as my previous apps managed their own 'cached' updates and thought I'd use Delphi's for this particular culprit (Tquery). All is fixed now, using my own method again.

lou

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top