When you use C # to access the Access database, you are prompted to find an installable ISAM, such as:
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. RowsI ["table_name"]. ToString());}} Conn. Close();
After several modifications, the test found that an unrecognized keyword, configuration item name in the connection string would prompt for an error that could not be found for installable ISAM.
The "PWD" in the connection string above is available in the connection string for SQL Server, but is not recognized in access.
For example, the following statement also prompts for an error that could not be found for installable ISAM:
connectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=db.mdb;abcd=123";
Correct connection string notation:
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; ";
You are prompted to find an installable ISAM
when you access the Access database by using C #