How to refresh/save database table in particular time interval frquently?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yuvang
    New Member
    • Oct 2008
    • 20

    How to refresh/save database table in particular time interval frquently?

    i have a mdb located in server and n number of users are accessing and adding data to that mdb (source table). now i want to save the mdb tables in particular time interval frequently.
  • youmike
    New Member
    • Mar 2008
    • 69

    #2
    The simplest way of achieving this is to write a DOS Batch file and run it at scheduled intervals. A batch file is simply a text file which DOS (underlying Windows) interprets.

    Here's an example:

    : In this file, any line that starts with a colon(:) is treated as comment.
    :Such lines are not processed

    : START OF DOS INSTRUCTIONS
    rd /S /Q \\Server\F:Pers BU\********\3
    ren \\Server\F:\Per sBU\********\2 3
    ren \\Server\F:\Per sBU\********\1 2
    md \\server\F:\Per sBU\********\1
    xcopy D:\********Data \\Server\F:\Per sBU\********\1 /I /S /E /C /F /K /Y
    xcopy C:\Docume~1\use r\LocalS~1\Appl ic~1\Identities \\Server\F:Pers BU\********\1 /I /S /E /C /F /K /Y
    xcopy C:\Docume~1\use r\Applic~1\Micr osoft\addres~1 \\Server\F:\Per sBU\********\1 /I /S /E /C /F /K /Y
    ATTRIB -H -R -S \\Server\F:\Per sBu\********\1
    : END OF DOS INSTRUCTIONS

    : Notes regarding customising

    : For this batch file to work, you need to create 3 empty folders called 1, 2, 3 in the target location for your backup. The process works by deleting folder 3, the oldest, renaming 1 & 2 and then creating a new folder 1, into which your database is copied. The big advantage of this approach is that you don't need to close the database for the process to run.

    : This batch file was written for specific locations. You need to edit Drive, Folder and File details to suit your own needs
    : All changes must be exactly right. Typing errors are the biggest cause of problems when writing batch files.
    : In the General Section,"****** **" should be changed to whatever other name is needed.
    : The text in the first XCopy line should be changed from "D:\********Dat a"as necessary.
    : The Batch file should be saved under a new name, "********.b at".

    Comment

    • yuvang
      New Member
      • Oct 2008
      • 20

      #3
      thanks for ur Reply. But i aspect is different. i want to update/save my database in same time interval frequently...

      Comment

      • youmike
        New Member
        • Mar 2008
        • 69

        #4
        To do this you simply set up a scheduled task in Windows, setting the repeat interval to whatever you wish. The scheduled task runs the batch file. The example I gave you is a version of one I use to run hourly. In this case there are more generations of folder, so that the risk of repeatedly backing up a corrupt file is reduced. As part of this strategy, separate daily and weelky tasks are also run.

        Comment

        • yuvang
          New Member
          • Oct 2008
          • 20

          #5
          Compulsory there should be a VBA code to save the MS Access (MDB) database in frequent time interval that i need........... ..........


          Like AutoSave.

          Comment

          Working...