通过不同的API,我使用相同的参数到达相同的代码。
public void Foo(string nprPath, int maxConnections = 3)
{
var connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + nprPath;
using (var connectionPool = new ConnectionPool(maxConnections, connectionString))
{
....
}
}
我输入了准确的参数进入方法。其中一个API成功执行,而另一个则抛出以下异常:
{"The ITransactionLocal interface is not supported by the 'Microsoft.ACE.OLEDB.12.0'
provider.Local transactions are unavailable with the current provider."}
使用ACE.OLEDB.12需要什么先决条件?