copy database

J

jokobe

hi,
trying to copy the database from a form. But with myobj.copyfile
mysource.mdb, mytarget.mdb I'm not successfull, cause copying isn't
possible when the database is opened (as far as I know).
A solution would be a batch file, but I want to have all the stuff
within the database.
Any helpful hint?
 
K

Kai Apel \(Berlin\)

I don´t know, my way is an other database with only a form with a button to
start a backup.bat for making a complete backup zip (with freezip) of the
installationspath and named this file with a nuber and a timestamp.

Kai
 
J

John Vinson

hi,
trying to copy the database from a form. But with myobj.copyfile
mysource.mdb, mytarget.mdb I'm not successfull, cause copying isn't
possible when the database is opened (as far as I know).
A solution would be a batch file, but I want to have all the stuff
within the database.
Any helpful hint?

The .mdb file (or, if you have a split database, the two .mdb files,
frontend and backend) DO contain "all the stuff" in the database.

Copying an open .mdb file is very risky. If you can do it at all, it's
quite possible that the copy will be corrupt and unusable. If you want
to copy the data, simply copy the .mdb file itself, or the backend
file if it's split, while the database is NOT open. This can be done
in code from another database, or externally using Windows Explorer or
a .bat file.

John W. Vinson[MVP]
 
Top