Troubleshooting Could not find installable ISAM er

2019-08-08 10:23发布

I have 32-bit MS Office 2013 Installed, along with the 32-bit office redistributable and a small c# console application set to compile to 32-bit.

The following code causes an OleDbException stating "Could not find installable ISAM."

public void GetData()
{
    var fileName = @"c:\temp\Sales DataBase_Test.accdb";
    var connection = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Soure='" + fileName + "'";
    using (var conn = new OleDbConnection(connection))
    {
        conn.Open();
        conn.Close();
    }
}

Instead of randomly applying solutions from a dozen vague answers, I'd like to know:

  • what that actually means?
  • What is an installable ISAM?
  • How do I get a list of them?
  • How do I know which are available?
  • Finally, how do I know which Providers are available on any given machine?
  • Is there a way to enumerate these things and properly troubleshoot?

1条回答
Viruses.
2楼-- · 2019-08-08 10:47

My issue turned out to be aging eyes and fat fingers: "Data Source" was misspelled as "Data Soure".

This doesn't answer my questions, but may help someone else. I generated a working connection string by linking the data in Excel and then copying and pasting and then removing what I didn't need.

  1. Get data from access (pick any table). enter image description here

  2. Next open connections.

    enter image description here

  3. You can then look at the properties of the connection and copy a working connection string which you can paste into your code and edit.

    enter image description here

查看更多
登录 后发表回答