Results 1 to 8 of 8
  1. #1
    imranbhatti is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2013
    Posts
    6

    How to determine if the DB is opened by another user on DropBox?

    Hi



    I have googled this matter but unfortunately could not found the solutions. What I found were actually suggestions about not using the "DropBox" as a sharing plateform for Access DB.

    Problem is when different users modify the database file, a conflict copy is created. Now what I want to achieve is " while opening the database file ,I want to be notified that another user is working on the database.

    It is just like an hypothetical "Before open" event. May we get such a notification before opening the DB.

    I hope this makes sense.
    Lemme know if some other information is required.

    Best Regards
    Imran Bhatti

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,421
    What I found were actually suggestions about not using the "DropBox" as a sharing plateform for Access DB.
    Dropbox is OK for sharing data, but not OK as a location for putting data that will or could be changed by more than one person. So the advice you have found is correct.

    When access is opened, it creates a locking file (.laccdb) with the name of the file opened - find out where that file is created and if it is on dropbox (and visible to other users), you can tell users to look for that file first - but it may the name of the opened file will be some sort of dropbox admin reference id.

    However it is quite possible that a copy is opened and opened exclusively, in which case a locking file is not created, so don't be surprised if you can't find one.

    Not tried, but you could try opening the dropbox file exclusively - this would normally provide a 'file opened exclusively' type message to the next user and prevent other users from opening the db. You cannot open exclusively by simply navigating to the file and opening it, you have to open access first, select File>Open, navigate to the dropbox folder and select the file. But before opening, in the dropdown bottom right (which will be saying 'Open'), click on the down arrow and select 'Open Exclusive'

    Alternatively, for each user you can go to File>Options>Client Settings and in the advanced section change the setting from 'open shared' to 'open exclusive'. Note this will affect how they open all db's, not just the ones on dropbox.

    I think what you would need is some sort of dropbox functionality (but no idea whether that functionality exists). When a file is opened in dropbox, it is actually a copy the user is working on, not the original.

  3. #3
    imranbhatti is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2013
    Posts
    6
    Quote Originally Posted by Ajax View Post
    When access is opened, it creates a locking file (.laccdb) with the name of the file opened - find out where that file is created and if it is on dropbox (and visible to other users), you can tell users to look for that file first - but it may the name of the opened file will be some sort of dropbox admin reference id.
    Hi Ajax! Thanks for the reply.

    Well spotted the captioned symptom .Can this be manipulated somehow. I mean user will not see the locking file. And by the way my users will not be opening the DB as exclusive.it is confirmed.
    Now any possibility I can check whether the locking file of the DB exists or not before opening?

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,421
    And by the way my users will not be opening the DB as exclusive.it is confirmed.
    My point is it may not be something under user control, but something that dropbox might be doing. All I'm suggesting is perhaps you can enforce that by opening exclusive.

    Now any possibility I can check whether the locking file of the DB exists or not before opening?
    No idea, can you confirm the locking file exists on dropbox? Quite simply, you need to look for it. If it exists, it may be in dropbox on the web, your local dropbox folder, somewhere vague around temporary files?

    This suggestion will only work (correction: may only work, since it is not tested) if the locking file is in dropbox and visible to all users. If not, then see alternative option below otherwise you are out options - as previously mentioned, dropbox is not ideal for this sort of thing.

    If all users can see the locking file, you need code to run whent he db opens to open it to see the contents (it is a text file). The contents usually provide the names of the users groups (depends on how things are set up on dropbox) but they may all be the same ('admin' or similar). However that does not really matter, what matters is the number of users - you can expect 1 (the first user) any more than that and there is more than one, so generate an error message and close the db down for the subsequent users.

    Another possible option is to create your own locking file - again with code to run when the file is opened to create a text file visible to all on dropbox. If the file already exists you will get an error - ergo there is another user using the db so provide an advisory error message and close the db. You will also need code to run when the db is closed to remove the textfile from dropbox - and you will need to ensure this code does run regardless of how the user closes the db otherwise all users will be locked out until you delete the text file manually.

    All the above is untested and I've no idea if it would work as you require or what the code would be.

    Personally, you would be better putting your backend on sharepoint or azure

    good luck with your project

  5. #5
    imranbhatti is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2013
    Posts
    6
    Thanks Ajax....I will give the prescribed solutions a shot except for changing the sharing platform. Many thanks for your time with my thread.

  6. #6
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    I have been following this thread to see if you have found a solution.

    I have not been able to figure out any reliable way to share an Access database by multiple users using Dropbox or any similar file sharing service.

    Please keep up updated on your progress. I will do the same.

  7. #7
    imranbhatti is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2013
    Posts
    6
    Hi HiTech
    For the time being Ajax's suggestion (looking for locking file i.e.laccdb) is working for me.However I am still searching another way to check the status of shared file if it is opened then the owner of the file can close the other instance opened by another collaborator in other corner of the city or world and open his own instance. This could could be done if Dropbox provides an API for this. I am searching for conventional ways to achieve this.
    Please if YOU find any solution some day , please DO share here.

    Best Regards
    Imran Bhatti

  8. #8
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Quote Originally Posted by imranbhatti View Post
    Hi HiTech
    For the time being Ajax's suggestion (looking for locking file i.e.laccdb) is working for me.
    Are you looking for the locking file on Dropbox server folder?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 09-23-2016, 08:46 AM
  2. Replies: 10
    Last Post: 05-02-2016, 12:19 PM
  3. Replies: 3
    Last Post: 08-26-2015, 09:46 AM
  4. Replies: 5
    Last Post: 01-12-2015, 03:44 PM
  5. Replies: 2
    Last Post: 11-25-2014, 09:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums