• 1 user at a time (acc 2000)

    Author
    Topic
    #374713

    howdy friends,

    with my internship coming to an end it is fitting i need the forum for one last piece of help. We have created a database and placed in on the network dive to allow multiple users within the group to have access to it. there is a security issue because we only want 1 person at a time opening the database. if 2 users have the DB open at the same time huge problems could occur. is therre a way to limit the open privlege to only one at a time. i want to “lock” the file if it is already open. i have tried the exclusive seetting but it does nothing since the DB is on a local network drive on not on someones computer. we need 1 user access for a networkrd database, this has to be available. thanks for all the help.

    Ed the intern

    Viewing 1 reply thread
    Author
    Replies
    • #607056

      It doesn’t matter whether the database is on a local drive or on a network drive. If anyone opens the database exclusively (with the Exclusive setting checked), no one else can open it.

      • #607073

        thats exactly what i thought. i went uder tools > options >advanced and checked off exclusive. this was also done on th eother computer that would be opening the file. we can still both open the DB at the same time. is there another setting that needs to be in place? i feel as if we have missed a step somewhere. i followed the help instrcutions and yours but nothing is done. whether or not exclusive is checked the DB can be opened 2x. any suggestions or settings we also need in place to get tiss to work? thanks alot.

        • #607077

          The Exclusive option only works from within Access – if it’s set, the Exclusive checkbox will be on by default in the File/Open… dialog. It doesn’t apply if you open the database from Windows Explorer.

          You can make a shortcut that opens the database exclusively. You’ll have to instruct your users that they must always use this shortcut to open the database. Set the target of the shortcut to

          “C:Program FilesMicrosoft OfficeOfficeMSAccess.exe” “F:AccessMyDatabase.mdb” /excl

          Replace “C:Program FilesMicrosoft OfficeOfficeMSAccess.exe” by the exact path and filename of the Access executable.
          Replace “F:AccessMyDatabase.mdb” by the exact path and filename of your Access database.
          The /excl option instructs Access to open the database exclusively.

          HTH,
          Hans

          • #607088

            great hans!!!!! thats an awesome little tid bit. i never would have known it was an exploer issue and needed ot be done within access. my DB is finally perfect, never thought i could say that!!!!!!!!!!!!!!!!!!! thanks

    • #607123

      It sounds as though your problem is solved. There is another possibility whereby you would examine the .ldb file for that database to determine the number of users who have it open, in code, and not allow another instance to be opened if the number is above a threshold, in your case, one. This would eliminate relying on users to always use the shortcut you provide. If it’s of interest to you, post back and I’ll dig up the code.

      • #607133

        the short cut does get the job done fine, but if it wasn’t a hastle i’d liuke to see what that code would look like. its not a big deal im just a little curious of howw you would go about that. thanks a lot

        • #607136

          hushmouth Doh! I may have typed too soon. The function I referenced was authored by Susan Sales Harkin in the November 2000 issue of Inside MS Access, and, as such, is copyrighted. Her article details how to use an ADO schema recordset to fetch a list of users with a database open. My apologies! You might contact the nice folks at Element K Journals to ask about a single back issue purchase. Personally, I find the function invaluable.

          • #607147

            Another thought is to set the drive so that it has no “Create” privileges then Access will only open exclusive smile

        • #607146

          The article Shane is talking about may be copywritefd, in the MS KB you can find an article how to read a ldb file.
          See Check Who Logged into Database with Jet UserRoster in Access 2000
          With a little modification you can use the code to limit the access to your database to only 1 user.

    Viewing 1 reply thread
    Reply To: 1 user at a time (acc 2000)

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

    Your information: