When using c # To Access the Access database, the system prompts that the installable ISAM cannot be found,
When using c # To Access the Access database, the prompt is displayed.Unable to find the installable ISAMSuch:
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 several modifications and tests, it is found that as long as an unrecognized keyword or project name appears in the connection string, a prompt is displayed.Unable to find the installable ISAM.
The "Pwd" in the above connection string is available in the SQL Server connection string, but it is not recognizable in Access.
For example, the following statement will promptUnable to find the installable ISAMError:
connectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=db.mdb;abcd=123";
Correct Writing of the connection string:
ConnectionString = "Provider = Microsoft. jet. OLEDB.4.0; Data Source = db. mdb; jet oledb: database password = 123; "; // or: connectionString =" Provider = Microsoft. ACE. OLEDB.12.0; Data Source = db. mdb; jet oledb: database password = 123 ;";