Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Backing up Access Database?

Status
Not open for further replies.

kovas

Technical User
Aug 6, 2002
88
US
I have a vb program with an access database, i am looking for a way to backup the access database daily. I was thinking of having the user click Backup and have a copy of the database made and put in a backup folder. Does anyone have any suggestions?

thank you.
 
I would take a look at the JRO (Jet and Replication Objects) which are a companion to ADO. You can include them into your VB projects, then upon the button press, you can use the CompactDatabase method, writing into your backup database.

You may also look into setting a system timer (not the intrinsic control) to automatically fire off this event once a day during non-use times. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
I'm also planning on incorporating this sort of procedure into a project I've been working on. In addition to using JRO to compact and repair the database, I also intend to zip the compacted database. I've noticed that .mdb files compress quite alot which should make it easier for the user to put their backup on some removeable media.
 
Try using the PKZIP compressing utility.

Private Sub Command1_Click()
Shell "PKZIP C:\Backup.Zip Access.Mdb ", 1
End Sub





 
maybe you should consider Microsoft Backup (or any third party software) to auto backup the mdb file.
 
Putting the database in a Backup Folder is a good idea for a temporary backup. But not for an on going backup strategy.
You need to back it up to some removable media as suggested above.

You have not said if the database is multiuser - if it is you will need to ensure that no users are connected to the database when backing it up.

If you want it done once a day use a scheduler program to run the backup - maybe at night

Hope this helps
Paul

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top