How to Backup MS Access Database?

  • Thread starter Thread starter Prabhat
  • Start date Start date
P

Prabhat

Hi Friends,

My Application is connected to MS Access database. I want to provide one
option as Backup and another option for Restore. I use Delphi 5 with ADO to
connect DB.

What is the best way to Backup the Dabase and Restore it?

I think as this is a Filebased DB, We should Make a Copy of the Database
file (.mdb) and Compact the new copied file.

Please suggest any idea. If i can get some Code fragment it will be helpful
for me.

Thanks
Prabhat
http://prabhatnath.blogspot.com
 
Copying the file is the best way to back it up.

I am informed in another forum that Access 2003 has a BACKUP option
on the database utilities menu. Is this true? And, of so, how does
it work?
 
You were informed correctly. I never noticed it before, but it's there. It
just makes a physical copy of the .mdb file, defaulting to adding the date
to the file name, like "_2007-05-23". The backed up copy is an mdb file.

From the help file:
Back up an Access database

1.. Save and close all objects in the database.
2.. On the File menu, click Back Up Database.
3.. In the Save Backup As dialog box, specify the name and location of the
backup copy.
 
it is impossible to reliably backup an access MDB database

you shoudl move to SQL Server; this has the 'maintenance plan wizard' built
into the product
 
You were informed correctly. I never noticed it before, but it's
there. It just makes a physical copy of the .mdb file, defaulting
to adding the date to the file name, like "_2007-05-23". The
backed up copy is an mdb file.

From the help file:
Back up an Access database

1.. Save and close all objects in the database.
2.. On the File menu, click Back Up Database.
3.. In the Save Backup As dialog box, specify the name and
location of the
backup copy.

If you can tell, does it use a file copy (i.e., closes the database
and copies it) or does it compact to the new filename or use some
other Jet command to create the backup?
 
If you can tell, does it use a file copy (i.e., closes the database
and copies it) or does it compact to the new filename or use some
other Jet command to create the backup?

--
Hi,

I have tested the Backup procedure in MS Access. It is using the Jet Command
(JRO) to Compact the Database and Copy it with the "Date" added to the DB
file name.

Thanks
Prabhat
http://prabhatnath.blogspot.com
 
Back
Top