Simon,
I don't believe that there is a command that you can issue through the
OleDb provider that will do this. You might have luck with ADOX (accessed
through COM interop), but I am not sure if there is a method there to do
that.
At the worst, you can use COM interop to open up an instance of Access
(hidden of course) which opens the MDB file, and then compacts it. The
object model for Access most definitely exposes this functionality.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Simon Johnson" <ck***@hotmail.com> wrote in message
news:bt**********@sparta.btinternet.com...
Hi all,
I'm writing a program that does a lot of table droping and updating..
After i've performed these steps it would be nice to run the compact and
repair function on the database. How can I do this?
Yours,
Simon.