When using c# to access the Access database, it promptsCannot 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 promptcannot be installed with ISAMwill 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 promptCannot find the installable ISAMerror:
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 promptsCannot 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 errorcannot be found for installing ISAMwill 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 promptCannot find the installable ISAMerror:
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!