When you use C # to access an Access database, you are prompted to find an installable ISAM

Source: Internet
Author: User

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 #

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.