• Locking problem

    Author
    Topic
    #352361

    We use Access 97 SR-2. Four users work in a database. They have been working in it for a few months. All of a sudden, last week, they started getting the following error messages:

    Couldn’t save; currently locked by user “Admin” on machine ’45’

    The Save operation failed.

    Out of memory.

    All four users have made sure that No Locks is checked.

    We also have four other users using a different database that have a similar problem.

    Any idea what is going on?

    Thanks.

    Viewing 7 reply threads
    Author
    Replies
    • #512243

      Have you tried a repair on the back end data database?

    • #512244

      Yes, Andy. We ran a database repair and compacted it.

      • #512246

        Check the systems for orphan .ldb files and delete them. Regarding compact/repair – have you run Jetcomp.exe ?

    • #512247

      OK, we will look for .ldb files. We have not done a Jetcomp.

      • #512250

        For future archive searchers, an excerpt from MS KB re: Jetcomp JETCOMP.exe does not attempt to open and close the database before compacting, and may therefore be able to recover some databases that the Microsoft Access compact utility and the CompactDatabase method cannot.

        Further information is available Here with a link to download Jetcomp.exe

        • #512255

          Have you made any design changes to either of these databases recently? Out of memory messages can be caused by repeatedly running blocks of code that create but do not destroy object variables (i.e., Dim dbs as Database, but no Set dbs = Nothing).

          Have you applied any of the Jet service packs to any of the machines? A difference in Jet service packs between machines can cause all sorts of odd behavior.

          • #512259

            I had a similar problem with a single database shared on a network drive. When a design change was made it could not be saved until all users had closed out. Until the database was free, I received error messages identical to yours.

    • #512277

      Charlotte, I don’t think there have been any design changes or updates of jet service packs. This database has very little code.

      Brian, I know what an .ldb file is but am not sure what “orphan” means. The network folder only contains one .ldb file that carries the same name as the database. On the users c: drive, there are a lot of .ldb files, but none have the same name as the network copy. From what I have read, the .ldb file is created each time the database is loaded (since Jet 3.0). Could it be that the .ldb files on their c: drives are interfering with the network copy? I have a feeling that they don’t. Anyway, let’s not give up. There has to be a reason for this behavior.

      • #512305

        When closed correctly the ldb disappears like a nice temporary file should. Sometimes, when Access is not properly closed or the os crashes, the ldb (locked database) file will remain on the system. That can cause problems There should only be one ldb per Access session. Close the application and scout for an ldb. If Access isn’t running, and there are ldb files nuke em’ they’re orphans, don’t belong to anybody

        • #512369

          You may run into an ldb file that refuses to let you delete it. In that case, log out of Windows and back in again, and you should be able to delete the little devil!

    • #512385

      Make sure the users are all using their own copies of the front end, otherwise if one decides to, say, bold the text in a control, they will lock everyone else out!

    • #512417

      Brian, in what location is the .ldb file created? The database resides on a network server in a particular folder. When a user opens the database, is the .ldb file created in the same folder? If another user opens the same database, is an .ldb file created for the new user?

      I have opened the .ldb files using Notepad. It contains the name of a machine and Admin or admin. It may contain one machine name or more. Could there be a conflict with the machine names/Admin and admin in the .ldb file?

      • #512445

        Hi Lonnie:
        First, a little background: [indent]


        A locking information (.LDB) file is used to control multi-user locking in Microsoft Access tables. In a multi-user environment, each user who opens the database has an entry in this file. Microsoft Access uses this information to tell which records are locked in a database, and who has them locked, to prevent possible file contention errors and database corruption by multiple users. The file is created automatically when you open a Microsoft Access database (.MDB) file. You can delete a database’s .LDB file only when no users have the database file open.


        [/indent]In answer to your question, the .ldb file is created in the folder where the .mdb file resides. No matter how many users access the .mdb, only one .ldb should be created. A machine name Admin should cause no conflict. Are you running a Split Database Back End and Front Ends ? If you are, there will be an .ldb on the users machine as well as one on the machine holding the back end. If you haven’t split your database you should seriously consider it.

      • #512446

        FYI, There is only one ldb file created for a database, regardless of the number of users who are in it, and that is in the same folder as the database. After the first user, the information for other users goes into the same ldb. The Admin user is the default, and if Access security has not been implemented, everyone logs in as Admin. The entries are machine specific, so there is no problem with multiple admin users.

    • #512591

      Good suggestion, Pat. Memo fields can cause all kinds of strange symptoms when they go bad, and it can be only a record or two that has a problem! This should always be one of the first things you check.

      • #512687

        You’re right Charlotte (naturally) By the way, have you ever seen any code that would detect corrupt memo fields? Sure would be nice.

        • #512790

          No, but it would be handy, wouldn’t it? There probably is something like that out there, especially since memo fields don’t really live in the tables. Maybe I’ll do some looking around to see if I can track something down. Or could I encourage you to do the looking?

          • #512859

            I kinda did a little scounting around but couldn’t find anything, I’ll keep looking. I’ve got some ideas about the code but wouldn’t you know it, I can’t locate a database with any broken fields to try it out on. Normally that would be a good thing. Mind you it’s just a matter of time before one pops up again.

            • #512860

              Need help simulating a corrupt memo field? Try unplugging the network cable from a machine while the record is being saved from another machine. That should do the trick!

              -MarkJ-

            • #512865

              I like that I’ll give it a try. Thanks.

    • #513658

      Check those users’ machines and see if there’s a local ldb file that has been orphaned. If only two are getting it, it has to be something peculiar to those two machines.

    Viewing 7 reply threads
    Reply To: Locking problem

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: