Making Back-up 's with Access DB 
Author Message
 Making Back-up 's with Access DB

I need help!... I use Visual Basic 5.My application uses a MSAccess
file. I want the application to make a back-up copy of that file and
then be able to load it into the system again, just in case something
happends..  I really appreciate anyone's help

Thank's

JOE

Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.



Sun, 27 Jan 2002 03:00:00 GMT  
 Making Back-up 's with Access DB

Quote:
> I need help!... I use Visual Basic 5.My application uses a MSAccess
> file. I want the application to make a back-up copy of that file and
> then be able to load it into the system again, just in case something
> happends..  I really appreciate anyone's help

Joe,

You can use the FileCopy command to copy the MDB file to another directory
or another name.  The trick is you'll need to make sure that everyone
(assuming this is a multiuser app) is out of the application, and that the
backup process in the app itself first closes the database and kills any
connections to the database (recordsets, etc) that may exist in that
instance of the app.  If the FileCopy fails, there is probably a stray
connection to the DB still open somewhere in your app.

If you want to archive the DB on diskettes or ZIP disks (assuming at some
point you'll need to span multiple disks), I have a VB6 backup control for
sale at my site if you're interested.

--
Vinnie Murdico
Software with Brains, Inc.
Visual Basic Controls and Components
SWBTracker - Value-Priced Defect Management Software
http://www.softwarewithbrains.com



Sun, 27 Jan 2002 03:00:00 GMT  
 Making Back-up 's with Access DB

Quote:
>You can use the FileCopy command to copy the MDB file to another directory
>or another name.  The trick is you'll need to make sure that everyone
>(assuming this is a multiuser app) is out of the application, and that the
>backup process in the app itself first closes the database and kills any
>connections to the database (recordsets, etc) that may exist in that
>instance of the app.  If the FileCopy fails, there is probably a stray
>connection to the DB still open somewhere in your app.

Joe,

You can also use the "failsafe" way and use either Jet Replication or
synchronize two access databases.  Basically, construct another database, if
possible, empty (using the various "Jet Engine" objects for DAO or ADO), then
copy records from the original database to the backup database.  This takes
more work in the long run, but reduces "cleanup" code (sometimes it's not
possible to "kick" everyone out of a database...for instance, a database
running on a web server).  Additionally, you get the ability to create a
general "backup" system which you could use for both full- and
incremental-backups; and additionally full or selective archival.

Another good alternative to the FileCopy command (though it also requires all
users out--since it needs exclusive-access mode) is to "Compact" the database
to the backup file.  This will have the side-effect of reducing wasted space
and can be done at normal "maintenance" times.

-Curtis Spendlove
-Solstice Software



Tue, 29 Jan 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Making back ups

2. Backing up tables to external access db's

3. Using unbound forms to speed up front/back end access db

4. Time Portion of date not being passed back to access DB

5. Empty field writing back to Access DB from VB

6. Time Portion of date not being passed back to access DB

7. Backup Access DB from VB

8. Making VB let of an Access db

9. Making an ACCESS DB the Design Master

10. Can't access db in Access 2000 using ADO

11. col.Remove and col.Add won't work back-to-back

12. How to access a DB's form's control from w/i VB module

 

 
Powered by phpBB® Forum Software