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

Source: Internet
Author: User
Tags access database

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 #

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.