Backup of access database .....
Can u please tell is it possible to take a back-up of data contain mdb file with visual basic 6.0.
is it possible please write the code..
Web Development
Can u please tell is it possible to take a back-up of data contain mdb file with visual basic 6.0.
is it possible please write the code..
by sl-campbell
Seeing how an MDB is just a file you could close all connections and then just do a file copy using the "FileCopy" commany.
Or you can compact the database, which compacts it into a new file:
Under DAO:
DBEngine.CompactDatabase "Source.MDB", _ "Destination.mdb
ADO/DAO:
Set a reference to "Microsoft Jet and Replication Objects Library".
Then:
Dim oJDO As New JRO.JetEngine
oJDO.CompactDatabase "Data Source=Orig.Mdb;", _
"Data Source=BackUpName.Mdb;"
Then use "Kill" to delete the original and "FileCopy" to copy the backup as the original name.
by don_knl
by sl-campbell
by don_knl
by don_knl
This discussion is closed to new replies.
Sort by Trending