问题
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.
Get data from access (pick any table).
Next open connections.
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