When using c# to access the Access database, it prompts Cannot find installable ISAM, as shown below:
Code As follows:
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=db.mdb;Pwd=abcd;"; conn = new OleDbConnection(connectionString); conn.Open(); DataTable dt = conn.GetSchema("Tables"); if (dt != null && dt.Rows.Count != 0) { for (int i = 0; i < dt.Rows.Count; i++ ) { listBox1.Items.Add(dt.Rows[i]["TABLE_NAME"].ToString()); } } conn.Close();
After many modifications and tests, it was found that as long as unrecognizable keywords and configuration project names appear in the connection string, a prompt cannot be installed with ISAM will be prompted. mistake.
The "Pwd" in the above connection string is available in the SQL Server connection string, but it is not recognized in Access.
For example, the following statement will also prompt Cannot find the installable ISAM error:
connectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=db.mdb;abcd=123";
Correct connection string writing:
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=db.mdb;jet oledb:database password=123;"; //或者: connectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=db.mdb;jet oledb:database password=123;";
When using c# to access the Access database, it prompts Cannot find installable ISAM, as shown below:
The code is as follows :
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=db.mdb;Pwd=abcd;"; conn = new OleDbConnection(connectionString); conn.Open(); DataTable dt = conn.GetSchema("Tables"); if (dt != null && dt.Rows.Count != 0) { for (int i = 0; i < dt.Rows.Count; i++ ) { listBox1.Items.Add(dt.Rows[i]["TABLE_NAME"].ToString()); } } conn.Close();
After many modifications and tests, it was found that as long as unrecognizable keywords and configuration project names appear in the connection string, an error cannot be found for installing ISAM will be prompted. .
The "Pwd" in the above connection string is available in the SQL Server connection string, but it is not recognized in Access.
For example, the following statement will also prompt Cannot find the installable ISAM error:
connectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=db.mdb;abcd=123";
Correct connection string writing:
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=db.mdb;jet oledb:database password=123;"; //或者: connectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=db.mdb;jet oledb:database password=123;";
The above is the detailed content of Detailed introduction: When using c# to access the Access database, it prompts that the installable ISAM cannot be found (picture). For more information, please follow other related articles on the PHP Chinese website!