Troubleshooting Could not find installable ISAM error

China☆狼群 提交于 2019-12-02 09:43:54

问题


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:


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).

  2. Next open connections.

  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.



来源:https://stackoverflow.com/questions/31279449/troubleshooting-could-not-find-installable-isam-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!