By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,301 Members | 3,690 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,301 IT Pros & Developers. It's quick & easy.

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

P: 20
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.
Oct 7 '08 #1
Share this Question
Share on Google+
4 Replies


P: 69
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:PersBU\********\3
ren \\Server\F:\PersBU\********\2 3
ren \\Server\F:\PersBU\********\1 2
md \\server\F:\PersBU\********\1
xcopy D:\********Data \\Server\F:\PersBU\********\1 /I /S /E /C /F /K /Y
xcopy C:\Docume~1\user\LocalS~1\Applic~1\Identities \\Server\F:PersBU\********\1 /I /S /E /C /F /K /Y
xcopy C:\Docume~1\user\Applic~1\Microsoft\addres~1 \\Server\F:\PersBU\********\1 /I /S /E /C /F /K /Y
ATTRIB -H -R -S \\Server\F:\PersBu\********\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:\********Data"as necessary.
: The Batch file should be saved under a new name, "********.bat".
Oct 8 '08 #2

P: 20
thanks for ur Reply. But i aspect is different. i want to update/save my database in same time interval frequently...
Oct 15 '08 #3

P: 69
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.
Oct 16 '08 #4

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


Like AutoSave.
Oct 16 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.