A simple piece of code compresses the Access database, but encounters an error that was not encountered: unable to find the installable ISAM;
Try
{
String FromDB = @ "Provider = Microsoft. Jet. OLEDB.4.0; Data Source =. \ temp1.mdb ;";
String ToDB = @ "Provider = Microsoft. Jet. OLEDB.4.0; Data Source =. \ temp2.mdb ;";
JRO. JetEngine je = new JRO. JetEngine ();
Je. CompactDatabase (FromDB, ToDB );
MessageBox. Show ("database compression completed", "database compression successful", MessageBoxButtons. OK, MessageBoxIcon. Information );
}
Catch (Exception err)
{
Throw err;
}
According to the introduced method, related COM and using JRO are added and referenced, but the error persists!
Helpless, think of the http://www.connectionstrings.com/results found a string connection error,
I:DataSource is writtenDataSource
2. The semicolon is missing after the two connection strings.
A small error exposes the carelessness of writing a program at ordinary times, so I don't know why.