When using c # To Access the Access database, the system prompts that the installable ISAM cannot be found.

Source: Internet
Author: User
Tags sql server connection string

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 ;";

Related Article

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.