When you access the Access database using C #, you are prompted not to find an installable ISAM. For example, with:
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 many changes, the test found. Only the unrecognized keyword, configuration item name appears in the connection string, and you are prompted to find an error with the installable ISAM .
The "PWD" in the connection string above is available in the connection string for SQL Server, but is not recognized in access.
The scale, as in the following statement, also indicates that an installable ISAM error could not be found :
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 #