Advantage Lock errors HELP

Posted on 2012-08-24
Last Modified: 2013-02-28
We have an application that access the advantage 9.1 database server.

Lately we have been having issues with locks and permissions. Like below on the application  We have also had this issue with foxpro updates to the advantage database.

We are also getting some 5004 error messages.  .   I've been looking though Advantage help messages, and have found a suggestion that the issue pertains to new "features" in Vista, Windows7, and your server that are affecting rights detection.    However, I don't see any solutions.

ANy thoughts on what is causing this?
Question by:anderdw2
    1 Comment
    LVL 29

    Accepted Solution

    What if the error message is simply telling the truth in it's "may be" part of the message? What if the file or record is already locked?

    If you lock a file or record that's what you want to happen to other users also acquiring a lock. A client should react to that error in deciding to wait and retry or go on with something else. You need to establish an error handling here with TRA CATCH. It's not a problem, it's just the normal behavior in a multi user environment using manual locking strategies.

    If you rather would want an automatic behavior of wait and retry, then try SET REPROCESS TO -1, perhaps. I can't guarantee this will be repsected by the advantage database driver, though, maybe there is an equivalent setting you can set in the connection.

    Also see here:

    If you have both a classic foxpro application with native access and an application accessing data through advantage database drivers, then this mode is needed to respect native locks. Otherwise you can switch to Advantage Proprietary Locking, but not before all apps are migrated to not access data directly accessing the dbf/cdx files. In that mode presumably the Advantage driver is using dbf/cdx exclusive, as it's the only process needing file access and handling requests coming in from the ODBC layer.

    From what says in proprietary mode the driver queues requests and does not raise such errors, but that can only be used, once all applications only go through the AD driver.

    Bye, Olaf.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: (http://msd…
    Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now