-
I found in this forum how to compact an Access database using ADO. It uses the CompactDatabase method of a JRO.JetEngine object.
Here is the line I am getting an error on:
Code:
JRO.CompactDatabase "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=C:\VB Projects\CD400\CD400.mdb;" _
& "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=C:\TEMP\temp.mdb;Jet OLEDB:Engine Type=4"
I am getting the error number 3251: "Object or provider is not capable of performing requested operation."
What am I doing wrong ? Does anyone know how to do this ?
Thanks !
-
Check you version of your JET OLE DB provider. I've been able to do it successfully using the same logic with version 4.0 of the same provider.
-
Thanks !
It works great... I don't understand why it won't do it with that provider though...
Someone at Microsoft is probably laughing at me...