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.
+2
A:
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.
Mitch Wheat
2009-04-27 04:25:08
Yes, I saw that one there - however, I am asking about a C++ solution, which neither that question, nor any of the answers seemed to address.
Smashery
2009-04-27 04:33:51
Here's the same thing for C++http://support.microsoft.com/kb/230501found with googling "c++ JRO.JetEngine"
le dorfier
2009-04-27 05:12:44
@le dorfier: nice find! that one elluded me! :)
Mitch Wheat
2009-04-27 05:32:13
Any ideas on how to compact and repair an Access 2007 .accdb database file by code?
TheAgent
2009-10-10 15:32:17