Compact and Repair

  • Thread starter Thread starter Leila
  • Start date Start date
L

Leila

Hi,
Is it possible to programmatically (e.g via VB) compact and repair the MDB
file? I don't want to leave this job to users, instead my VB app must do it.
Thanks in advance,
Leila
 
DAO has a CompactDatabase method that you can use to compact a database
other than the one you're currently in.
 
Thanks Douglas,
What if I use ADO?



Douglas J. Steele said:
DAO has a CompactDatabase method that you can use to compact a database
other than the one you're currently in.
 
From a VisualBasic app?

If so, then one method is to use JRO (not "ADO").
(JRO = Microsoft Jet and Replication library)

Several examples on PlanetSourceCode:

Compact (and Backup) routines
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=59971&lngWId=1

Compact with graphical results
http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=47342&lngWId=1

many other examples....just do quick search for "Compact Access database"

(I have not tried these, so for sure first test on backups)

good luck,

gary
 
Thanks Gary :-)

Gary Walter said:
From a VisualBasic app?

If so, then one method is to use JRO (not "ADO").
(JRO = Microsoft Jet and Replication library)

Several examples on PlanetSourceCode:

Compact (and Backup) routines
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=59971&ln
gWId=1

Compact with graphical results
http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=47342&ln
gWId=1

many other examples....just do quick search for "Compact Access database"

(I have not tried these, so for sure first test on backups)

good luck,

gary
 
Back
Top