c# winforms 2010 'compact and repair' access database without DAO

cycledude
cycledude used Ask the Experts™
on
Hi

I have come across a situation where having a reference to DAO in my application  is causing problems at design time (https://secure.experts-exchange.com/Programming/Languages/C_Sharp/Q_28374832.html)

Is there any way to programatically compact and repair an access database without using DAO?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2015
Commented:
I don't know if it would be feasible in your project, but you could use the command line to do so. The "/compact" switch will trigger a compact-and-repair on the database file. You could use the Process class to execute such.

Author

Commented:
after a little more digging, it looks like DAO is the best way to compact a database, especially as it does not require the end users to have access installed.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial