MDE file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamest85
    New Member
    • Jan 2008
    • 12

    MDE file

    Hi;

    I have a basic question, after I created MDE file from MDB file, do I have to install the MDE file in each user's pc? (We are sharing the data from SQL server), or I only create a short cut for the MDE, so everybody in office will run that one which is located in a share folder?

    Thank you very much.

    Jt
  • Megalog
    Recognized Expert Contributor
    • Sep 2007
    • 378

    #2
    Every client has to have either Access installed, or the Access Runtime file. (runtime is free for access 2007, but not prior versions)

    Ideally, they should have a copy on their own pc, since the data is shared outside of the mde.

    What I've done, is create a batch file and give all the employees a shortcut to it (or link it from an intranet page). When they run the batch file, it deletes any existing copies of the MDE on the user's drive, and then creates a copy from the current live MDE on the network. This way, I can continuously update the MDB file, push out a new copy of the MDE on the network, mark it as read-only, and I know that whenever they start the application that they're using the most current copy available. Save the following in a text file and give it a .BAT extension, and edit to fit your situation:

    Code:
    DEL "C:\Data\*.mde /q
    
    copy "S:\YourNetworkPath\YourAccessFile.mde" C:\DATA /V /Y
    
    START /MAX "C:\Program Files\Microsoft Office\OFFICE12\MSACCESS.EXE /runtime" "C:\Data\YourAccessFile.mde"
    Your users will need to have a common folder to copy to locally, and in the last line, change it to whichever access version your clients are running.
    If they're using different versions, then you could make a different batch file for each version.

    Comment

    • missinglinq
      Recognized Expert Specialist
      • Nov 2006
      • 3533

      #3
      Yes, each user should have a copy of the frontend db on their own PC! Multiple users using a single frontend on a shared drive is one of the top two or three reasons cited for chronic corruption problems!

      Megalog has offered a solid strategy for updating and distribution of you MDEs.

      Welcome to TheScripts!

      Linq ;0)>

      Comment

      • jamest85
        New Member
        • Jan 2008
        • 12

        #4
        thanks guys, really helpful.
        jt

        Comment

        • missinglinq
          Recognized Expert Specialist
          • Nov 2006
          • 3533

          #5
          Glad we could help!

          Linq ;0)>

          Comment

          • Megalog
            Recognized Expert Contributor
            • Sep 2007
            • 378

            #6
            Am glad to help! If your MDE is pretty much finalized at this point, you can set this up and forget it. But if you're developing parts of it while it's in use, this will save you a lot of headaches. You can also set up versioning, by storing a constant in a front-end module, and a value in the back-end, and have a small invisible form with a timer set to check every hour that the version numbers match. If they dont match, a simple message box can alert the user that there's a new version out there, and they should reload their MDE. This would work good for those who like to leave their applications running forever, or if they copy the MDE somewhere else to their system and open that instead of using the batch copy utility.

            Comment

            • jamest85
              New Member
              • Jan 2008
              • 12

              #7
              Sounds great, Megalog

              One more question:
              Usually I will ask each user to put a short cut to their desktop, if the .bat file called: myDataAccess.ba t,
              I will put it in each user's common folder (the folder which can load my Access MDE from the server pc).

              Then I just put the myDataAccess.ba t short cut to their desktop, so if the user clicks, it will run the .bat file automatically, and the new MDE will replace the current one.

              Am I correct? Any suggestion will be great.

              Thank you very much.

              jt


              Originally posted by Megalog
              Am glad to help! If your MDE is pretty much finalized at this point, you can set this up and forget it. But if you're developing parts of it while it's in use, this will save you a lot of headaches. You can also set up versioning, by storing a constant in a front-end module, and a value in the back-end, and have a small invisible form with a timer set to check every hour that the version numbers match. If they dont match, a simple message box can alert the user that there's a new version out there, and they should reload their MDE. This would work good for those who like to leave their applications running forever, or if they copy the MDE somewhere else to their system and open that instead of using the batch copy utility.

              Comment

              • Megalog
                Recognized Expert Contributor
                • Sep 2007
                • 378

                #8
                Originally posted by jamest85
                Sounds great, Megalog

                One more question:
                Usually I will ask each user to put a short cut to their desktop, if the .bat file called: myDataAccess.ba t,
                I will put it in each user's common folder (the folder which can load my Access MDE from the server pc).

                Then I just put the myDataAccess.ba t short cut to their desktop, so if the user clicks, it will run the .bat file automatically, and the new MDE will replace the current one.

                Am I correct? Any suggestion will be great.

                Thank you very much.

                jt
                Yep a shortcut to the .BAT file is ideal, since then you can make changes to the .BAT file whenever you want. So you're able to change your BAT, and MDE on the fly, giving you all the flexibility you want.

                Comment

                • martin DH
                  New Member
                  • Feb 2007
                  • 114

                  #9
                  Megalog,
                  First of all, I tried mirroring your directions above but must have missed something - the "new" mde was still the "old" mde after I ran the batch file.
                  Here is my Batch text:
                  Code:
                  DEL "C:\Documents and Settings\bcraft\My Documents\Tax\*.mde /q
                   
                  copy "U:\Db\BAT DB.mde" C:\Documents and Settings\bcraft\My Documents\Tax /V /Y
                   
                  START /MAX "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE /runtime" "C:\Documents and Settings\bcraft\My Documents\Tax\BAT DB.mde"
                  If this is all correct then I must be missing something else.

                  Secondly, could you offer some more detail here? I'm curious about the versioning for my development as well.
                  Originally posted by Megalog
                  But if you're developing parts of it while it's in use, this will save you a lot of headaches. You can also set up versioning, by storing a constant in a front-end module, and a value in the back-end, and have a small invisible form with a timer set to check every hour that the version numbers match. If they dont match, a simple message box can alert the user that there's a new version out there, and they should reload their MDE.
                  Thanks!
                  martin
                  Last edited by martin DH; Feb 15 '08, 03:29 AM. Reason: Added batch text

                  Comment

                  • Megalog
                    Recognized Expert Contributor
                    • Sep 2007
                    • 378

                    #10
                    Hey Martin,
                    Apparently when I copied my batch info over I missed a quote mark in the first row. And, the 2nd row should have had quotes around the destination path (in my example it works without quotes, but if you're using long path names with spaces, like you are, they should always be enclosed in quotes).

                    Here is what I should have posted above:

                    Code:
                    DEL "C:\Data\*.mde" /q
                     
                    copy "S:\YourNetworkPath\YourAccessFile.mde" "C:\DATA" /V /Y
                     
                    START /MAX "C:\Program Files\Microsoft Office\OFFICE12\MSACCESS.EXE /runtime" "C:\Data\YourAccessFile.mde"
                    so in your case, this should work:
                    Code:
                    DEL "C:\Documents and Settings\bcraft\My Documents\Tax\BAT DB.mde" /q
                     
                    copy "U:\Db\BAT DB.mde" "C:\Documents and Settings\bcraft\My Documents\Tax" /V /Y
                     
                    START /MAX "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE /runtime" "C:\Documents and Settings\bcraft\My Documents\Tax\BAT DB.mde"
                    Now, in the delete line, I have it set to delete all MDE's... You may not want that wildcard if you have more than one front end being executed from the same location.
                    Let me know if it works out for you. I'll get into how I did the versioning a bit later, although I think I've seen some similar examples already posted here in the forums in the past.. so you may want to try searching a bit.

                    Comment

                    Working...