Microsoft access/visual basic- database lockout between users

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stuart wieder
    New Member
    • Jan 2007
    • 11

    Microsoft access/visual basic- database lockout between users

    receiving error message "the database has been placed in a state by user .... on machine ......that prevents it from being opened or locked"

    i need to have multiple users being able to access the database at the same time
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by stuart wieder
    receiving error message "the database has been placed in a state by user .... on machine ......that prevents it from being opened or locked"

    i need to have multiple users being able to access the database at the same time
    It sounds as though a user has it opened for exclusive access. Are people likely to be using it directly through MS Access, or only through your application (assuming there is an application)?

    I believe you can set an option in Access that determines whether the default action is to open databases exclusively, or shared. If you're using VB (if so, what version?), then you use a parameter when you open the database to specify whether it is for exclusive use.

    Comment

    • stuart wieder
      New Member
      • Jan 2007
      • 11

      #3
      Originally posted by Killer42
      It sounds as though a user has it opened for exclusive access. Are people likely to be using it directly through MS Access, or only through your application (assuming there is an application)?
      THE APPLICATION IS OPENED FROM THE DESKTOP USING A SHORTCUT CREATED FROM AN ACCESS MACRO WHICH DOES OPENFORM OPERATION

      I believe you can set an option in Access that determines whether the default action is to open databases exclusively, or shared. If you're using VB (if so, what version?), then you use a parameter when you open the database to specify whether it is for exclusive use.
      VB 6.3 HOWEVER MY FILES ARE OPENED BY THE FORM

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Originally posted by stuart wieder
        THE APPLICATION IS OPENED FROM THE DESKTOP USING A SHORTCUT CREATED FROM AN ACCESS MACRO WHICH DOES OPENFORM OPERATION

        ...

        VB 6.3 HOWEVER MY FILES ARE OPENED BY THE FORM
        Ok, now you've lost me completely. If you are using an Access macro to open an Access form, then where does VB6 come into it?


        Ahah! Now I get it. This is VBA version 6.3, built into Access. Now it's starting to make a little sense, at least.

        I think you need to check your Access settings (Tools | Options | Advanced) for that database to see whether it is being opened for exclusive use by default.

        Comment

        • Killer42
          Recognized Expert Expert
          • Oct 2006
          • 8429

          #5
          Since this appears to be largely an Access problem rather than VB, I'm going to move this to the Access forum - we should find more help there.

          Comment

          • stuart wieder
            New Member
            • Jan 2007
            • 11

            #6
            DEFAULT OPEN MODE = SHARED
            DEFAULT RECORD LOCKING = NO LOCKS
            OPEN DATABASE USING RECORD LEVEL LOCKING IS CHECKED
            DEFAULT FILE FORMAT = ACCESS 2000



            Originally posted by Killer42
            Ok, now you've lost me completely. If you are using an Access macro to open an Access form, then where does VB6 come into it?


            Ahah! Now I get it. This is VBA version 6.3, built into Access. Now it's starting to make a little sense, at least.

            I think you need to check your Access settings (Tools | Options | Advanced) for that database to see whether it is being opened for exclusive use by default.

            Comment

            • MMcCarthy
              Recognized Expert MVP
              • Aug 2006
              • 14387

              #7
              Originally posted by stuart wieder
              DEFAULT OPEN MODE = SHARED
              DEFAULT RECORD LOCKING = NO LOCKS
              OPEN DATABASE USING RECORD LEVEL LOCKING IS CHECKED
              DEFAULT FILE FORMAT = ACCESS 2000
              These settings should allow the database to be opened in multiple locations (although I would recommend change Default Record Locking to Edited Record).

              Back to your problem. Do you know which machine has it open at the moment. Is there any problem with that machine? Have you tried to close the database on that machine?

              Mary

              Comment

              • ADezii
                Recognized Expert Expert
                • Apr 2006
                • 8834

                #8
                Originally posted by stuart wieder
                receiving error message "the database has been placed in a state by user .... on machine ......that prevents it from being opened or locked"

                i need to have multiple users being able to access the database at the same time
                __1 You will get this exact message when you have a Database Opened and an Object contained within it, say a Form, is in Design View. If you now try to open another Instance of this Database you'll get "the database has been placed in a state by user .... on machine ......that prevents it from being opened or locked"
                __2 If that is not the problem, close the Database and see if you have a .ldb file with exactly the same base name as the DB e.g. Employees.mdb ==> Employees.ldb. If this file exists once the Database has been closed, deleted it.

                Comment

                • noks
                  New Member
                  • Jan 2007
                  • 19

                  #9
                  Originally posted by stuart wieder
                  receiving error message "the database has been placed in a state by user .... on machine ......that prevents it from being opened or locked"

                  i need to have multiple users being able to access the database at the same time

                  Hi did u finally get the solution to this problem? coz am also experiencing the same problem

                  Comment

                  • NeoPa
                    Recognized Expert Moderator MVP
                    • Oct 2006
                    • 32633

                    #10
                    If you read through the posts and you'll find the solution :confused:

                    Comment

                    Working...