Smashery
Smashery

Reputation: 59653

Compact and Repair Database programmatically

How can I call Access's Compact and Repair Database utility from within C++? I'm already using ADO and ADOX, so a solution using either of those would be handy.

Upvotes: 1

Views: 2731

Answers (1)

Mitch Wheat
Mitch Wheat

Reputation: 300489

Similiar to:

How can I programmatically repair (not merely compact) an Access .mdb file?

You can do this using COM to access the JRO.JetEngine object. There is an example in C# at CodeProject which shouldn't be too hard to convert to C++.

UPDATE: Thanks to @le dorfier, here is an article with C++ example.

Upvotes: 2

Related Questions