Question

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

Was it helpful?

Solution

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?

OTHER TIPS

Although the question is quite old, I'd like to post an answer since using JetComp may still be of use for someone.

However, JetComp.exe does not seem to respond.

Because you used the wrong syntax. This is how it works:

jetcomp.exe -src:"G:\my database.mdb" -dest:"G:\my compacted database.mdb"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top