I am using OleDB to connect to an excel file using this connection string
@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 12.0 Xml;HDR=YES"""
But when I do this (what is inside TransactionScope ())
using (OleDbConnection conn = new OleDbConnection(connectionString)) { conn.Open(); ... }
I get the following error
The ITransactionLocal interface is not supported by Microsoft.ACE.OLEDB.12.0. Local transactions are not available with the current provider.
How to make OleDbConnection not try to write to a distributed transaction? The SqlConnection class has a ConnectionString property called "Enlist", but I cannot find an equivalent configuration or method for OleDB.
Jeremyweir
source share