Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Location
    Moorpark, CA
    Posts
    104

    Question Unanswered: Check In/Check Out Idea - Help!

    Ok - As you know from my numerous posts, I have been working on a fairly complicated Db (at least for access). Well I just got notified of a new feature (see below):

    I'm creating a DB where we will be tracking actual audits done externally.
    I was just informed that the auditors want to be able to "Check Out" the
    audit once it is created (basically take the information for the audit with
    them and Input the scores, etc. as they do it) and then when they return
    from doing the audit they want to "Check In" the audit where the scores
    they did while at the site are added back in to the Db. I don't even know
    where to start! Does anyone know where I can get help on this? Also -
    just let me know if you need me to explain further....

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    first thoughts:

    add field
    isOutWith, Long, FK to the user who checked out this audit
    to the master table (you probably have one that holds the main "reference" of the audit)

    copy the new backend structure to the local machine (easiest is copy the .mdb and then delete all records)

    to check-out idMaster 1234:

    UPDATE tblMaster SET isOutWith = myID WHERE isOutWith = "" and idMaster = 1234
    if .recordsaffected = 1, you now own audit 1234, else you don't

    DELETE everything from your local copy tables
    INSERT into your local copy tables everything WHERE isOutWith = myID
    ...simpler alternative is just copy the whole .mdb to the local machine

    ...so now you have two "backends"

    at startup, prompt the user for working online/offline
    ...and relink in code to either the local or the online tables

    modify any part of your application that edits anything so that:
    working online: no edits unless isOutwith = ""
    working offline: no edits unless isOutWith = myID

    to check an audit back in again:
    UPDATE everything WHERE isOutWith = myID and idMaster = 1234
    ...and finally flag the audit as checked back in again
    UPDATE tblMaster SET isOutWith = "" WHERE isOutWith = myID and idMaster = 1234

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Nov 2003
    Location
    Moorpark, CA
    Posts
    104
    Wow! Just a tad bit too complicated for me I think. I'm a fast learner, so if you have the time, I would appreciate it if you could explain your suggestion in a little more detail. I'm not quite sure I get the gist of what you are suggesting! Thanks again!

  4. #4
    Join Date
    Mar 2004
    Posts
    42
    How about using replica: Tools, Create Replica. Then after the audit synchronize both DB.

    HTH

  5. #5
    Join Date
    Nov 2003
    Location
    Moorpark, CA
    Posts
    104
    I would love to do something that simple!

    The problem is that I don't really know what "Create Replica" is supposed to be used for. Is this exactly what it is normally used for? Can you help explain the logic behind them?

    Also, If I do that - how do I synchronize them?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •