Through different API I arrive to the same code with the same parameters
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))
{
....
}
}
I enter the mefhod with the exact param. One API succeeds and the other throws the following
{"The ITransactionLocal interface is not supported by the 'Microsoft.ACE.OLEDB.12.0'
provider.Local transactions are unavailable with the current provider."}
Are there any prerequisites to using ACE.OLEDB.12
You may try to add ";OLE DB Services=-4"
to connection string.
Something like this:
var connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;OLE DB Services=-4;Data Source=" + nprPath;
Also check this related forum.
EDIT:-
When "OLE DB Services = -4; the it means:-
All except pooling and automatic transaction enlistment
Check the related MSDN
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With