469,271 Members | 1,544 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

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.
Oct 7 '08 #1
4 2123
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

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

: 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
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
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
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.

Similar topics

7 posts views Thread by Willem | last post: by
3 posts views Thread by Brian Basquille | last post: by
17 posts views Thread by Jim Little | last post: by
3 posts views Thread by david | last post: by
12 posts views Thread by martin1 | last post: by
10 posts views Thread by Piotr Nowak | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.