Backup Question

  • Thread starter Thread starter Joe Cilinceon
  • Start date Start date
J

Joe Cilinceon

How in code could I have an Access Database make a copy of itself to another
location like a second hard drive or CD. I would like to add this to a daily
shutdown procedure.
 
Well I looked at it but don't see how that would be much help. I'm looking
for a way to put a button on the form that will allow me to back up the
tables to another location, either a hard drive or CD. Thanks anyhow I do
appreciate it.
 
Joe said:
Well I looked at it but don't see how that would be much help. I'm
looking for a way to put a button on the form that will allow me to
back up the tables to another location, either a hard drive or CD.
Thanks anyhow I do appreciate it.

Well now you say "back up the tables" and originally you said you wanted the app
to "make a copy of itself". Douglas' response sent you to a solution for the
latter because without using the GUI you can't make an Access app copy or
compact itself, but you can lauch another app that will do the job.

If you just want to back up the data you can run routines to export them one at
a time to a separate file. If your app is split so that the data is in a
separate file you can copy or compact the back end file from code in the front
end providing that all connections to the back end data are first closed. This
is much more difficult in a multi-user environment unless you implement features
to "kick other users out" while this process occurrs.
 
Actually here is what I asked:

"How in code could I have an Access Database make a copy of itself to
another
location like a second hard drive or CD. I would like to add this to a daily
shutdown procedure"

Thanks Rick for your response and I might not have been clear with the first
question. I see where the the recommend program would have worked however it
seems to have a confict with VB.net 2003 installed on the machine, even
though I running it from Office XP Access 2002 DB. It worked great until it
shuts down then wants to send a message to MS. I'm just not knowledable
enough to debug this right now.

The database is split but and is not networked. I haven't programed since
Clipper and I'm learning this as I go so please be patient.

What I have now is a shutdown button on the main form that closes out the
day and compacts the DB before it closes and goes to Windows. This is all
working great. I simply wanted to add something to it to have it make a
backup copy somewhere. Now I have to do the copy to CDRW myself daily. If
you could point me to some code examples on how to copy a file (the table
mdb) to say a CD or Hard drive it would be appreaciated.
 
Thanks Doug

--

Joe Cilinceon


Douglas J. Steele said:
Take a look at the FileCopy command or the CompactDatabase command.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



however in
 
Joe said:
Actually here is what I asked:

"How in code could I have an Access Database make a copy of itself to
another
location like a second hard drive or CD. I would like to add this to
a daily shutdown procedure"

Thanks Rick for your response and I might not have been clear with
the first question. I see where the the recommend program would have
worked however it seems to have a confict with VB.net 2003 installed
on the machine, even though I running it from Office XP Access 2002
DB. It worked great until it shuts down then wants to send a message
to MS. I'm just not knowledable enough to debug this right now.

The database is split but and is not networked. I haven't programed
since Clipper and I'm learning this as I go so please be patient.

What I have now is a shutdown button on the main form that closes out
the day and compacts the DB before it closes and goes to Windows.
This is all working great. I simply wanted to add something to it to
have it make a backup copy somewhere. Now I have to do the copy to
CDRW myself daily. If you could point me to some code examples on how
to copy a file (the table mdb) to say a CD or Hard drive it would be
appreaciated.

FileCopy "Source Path" "Destination Path"

The above would likely not write to a CDRW unless it had been formatted with
packet writing software. If it needs to be "burned" to the CD you will have to
do that manually.
 
Got it Rick and it will if the CDRW has been formated. I'm using Nero
burning software and it is like working with another hard drive. It works
well as does the compact now. Thanks again for the help.
 
Back
Top