Backup Database

J

John

I am trying to come up with a way of backing up a database
everytime it gets opened (or alternatively upon close). I
want to do this in case anything bad happens while working
on a upgrade to the data structure, queries and forms.

Ideally, I would be able to have 5 prior "versions" of the
same file:
DatabaseName.mdb
DatabaseName1.mdb
DatabaseName2.mdb
DatabaseName3.mdb
DatabaseName4.mdb
DatabaseName5.mdb
The procedure would check the existance of 5 then delete
it and rename 4 to 5, check for 4 and 3 and rename 3 to 4,
check for 3 and 2 and rename 2 to 3, check for 2 and 1 and
rename 1 to 2 then copy DatabaseName to DatabaseName1.

I am looking for the code (in reply or web address) to do
this, where to insert or call this code from as well as
recommendation if I should back up on opening database or
on closing. If I do it on closing, how would the compact
on close affect the procedure.

Thank you in advance for your help.

I am sorry if this is the wrong newsgroup, was not sure.
 
R

RobFMS

John

It really sounds like you should be using Microsoft Visual SourceSafe.
http://msdn.microsoft.com/ssafe/

In short, you check your objects into VSS. When you need an object to be
modified, you check it out (like a library book) into your local copy. When
you are done with the edits, check it back into VSS.

If you suffer any local corruption issues, just toss out the .mdb and
download a new .mdb from VSS.

--
Rob

FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
K

Kevin3NF

Are you designing objects in the production database? Hope not...

If you are doing design work on a development copy, just make a copy and
start from there each time....

--
Kevin Hill
President
3NF Consulting

www.3nf-inc.com/NewsGroups.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top