title: Query throwing exception when called from C# Code
body: <p>I have following query in my stored procedure</p>
  
  <pre><code>SELECT * INTO my_table FROM OPENDATASOURCE('Microsoft.ACE.OLEDB.12.0',''Data Source=C:\TEMP_EXCEL\sheet.xls;Extended Properties=Excel 12.0'')...Sheet1$]
  </code></pre>
  
  <p>It runs fine when run it management studio but throws following error when called from C# code.</p>
  
  <blockquote>
    <p><em>System.Data.SqlClient.SqlException (0x80131904): The requested operation could not be performed because OLE DB provider
    "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" does not support
    the required transaction interface. Microsoft.ACE.OLEDB.12.0</em></p>
  </blockquote>
  
  <p>I have set following configuration values</p>
  
  <pre><code>EXEC sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess', 1
  GO 
  EXEC sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'DynamicParameters', 1
  GO
  </code></pre>
  
  <p>And also this</p>
  
  <pre><code>sp_configure 'show advanced options', 1;**
  GO
  RECONFIGURE;
  GO
  sp_configure 'Ad Hoc Distributed Queries', 1;**
  GO
  RECONFIGURE;
  GO
  </code></pre>
  
  <p>I have googled for this solution but all seem to have been discussing about making it run in SQL. </p>
  
  <p>Any help will be much appreciated</p>