views:

36

answers:

1

Hi,

I want to compact an access MDB database file using JetComp.exe . I want to pass the name of the file ( and the destination file) to Jetcomp.exe . However, JetComp.exe does not seem to respond. I tried the following:

jetcomp.exe -src:{"G:\my database.mdb"} -dst:"G:\my compacted database.mdb"                                                 

I can't use the GUI version of Jetcomp.exe as I want to include the line above in a database upgrader.

All the best, Seb

+1  A: 

Use the DBEngine.CompactDatabase method instead of JetComp. One less thing to distribute.

I also go a bit further. See Backup, do you trust the users or system administrators?

Tony Toews
Tony Toews - Thanks for the reply. Do you think I should use the method described in this article ? ( http://www.codeproject.com/KB/database/mdbcompact_latebind.aspx )
MadSeb
I'm not familiar with JRO but it should work the same way when it comes to compacting.
Tony Toews
JRO may or may not be installed on the PC you're working with, but DAO definitely will be. JRO has no reason to exist except for the stupidity of MS's ADO-everywhere campaign c. 2000, when they tried to replace Jet's native interface, DAO, with a non-native abstraction layer, ADO. JRO should be ignored for every purpose, except the one thing it does that can't be done with DAO, and that's initiate an indirect synch between two replicas in a replicated Jet database.
David-W-Fenton