I'm having a new problem in the same method, instead of bold italic accuses an unrecognized class problem, any hint how to solve? Code below:
public static void CompactarMdb(string caminhoaccdb){
JRO.JetEngine jetEngine = (JRO.JetEngine)Activator.CreateInstance(Type.GetTypeFromProgID("JRO.JetEngine"));
var arquivoTemporario = System.IO.Path.GetTempFileName();
arquivoTemporario = System.IO.Path.ChangeExtension(arquivoTemporario, "accdb");
string templateConnectionString = "Data Source={0}; Provider=Microsoft.Jet.OLEDB.12.0;";
string connectionStringFonte = string.Format(templateConnectionString, caminhoaccdb);
string connectionStringTemp = string.Format(templateConnectionString, arquivoTemporario);
***jetEngine.CompactDatabase(connectionStringFonte, connectionStringTemp);***
System.IO.File.Copy(arquivoTemporario, caminhoaccdb, true);
System.IO.File.Delete(arquivoTemporario);
}