LinqToExcel in transaction scope
I got InvalidOperationException when invoking your awesome library in transaction scope "ITransactionLocal interface is not supported". I can't solve this issue by extracting piece of code outside of transaction due to architecture. Found solution on SO, but your API doesn't allow to change connection string. http://stackoverflow.com/questions/19387695/error-the-itransactionlocal-interface-is-not-supported-by-the-microsoft-ace-o
Can you add some extra parameter to constructor or just add this parameter by default to connection string ?
Seconding this request.
One solution might be to allow arbitrary additions to the connection string via the ExcelQueryFactory, or allowing a ReadOnly access to also specify OLE DB Services=-4 in the query string, which will exclude the connection from pooling and automatic translation enlistment. The former is probably a bit more flexible.
Bump... Also getting this error as well. I found that someone had a workaround from #15 but I can't find the workaround. https://github.com/paulyoder/LinqToExcel/issues/15
Seems this issue still not being fixed after 2 years?
As Paul said in issue #15 to the user there, what is the use case? What are you trying to accomplish using transaction scopes?
My use case was creating a transaction scope for a bunch of database transactions that I wanted to tie together (an import from Excel where they all import or none do). However, because I'm processing the Excel file at the same time, LinqToExcel gets caught up in the transaction mechanism and the error occurs.
If I was able to mark the Excel data source as read only, or was able to specify OLD DB Services=-4 in the connection string to the Excel file, then it would not get picked up by the transaction scope.