OleDbConnection gets "External component has thrown an exception."
<p>I' m using a Windows Forms application to export data to excel.</p>

<p>Application is built both x64 and x86.</p>

<p>So both version of Microsoft Access Databse Engine must be installed to work the application on same computer.</p>

<p>Firstly AccessDatabaseEngine.exe is installed 
and AccessDatabaseEngine_x64.exe is installed passive.</p>

<p>x64 version of application is working </p>

<p>But x86 version is getting </p>

<pre><code>SEHException: "External component has thrown an exception."

 at System.Data.Common.UnsafeNativeMethods.IDBInitializeInitialize.Invoke(IntPtr pThis)
 at System.Data.OleDb.DataSourceWrapper.InitializeAndCreateSession(OleDbConnectionString constr, SessionWrapper&amp; sessionWrapper)
 at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
 at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
 at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
 at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
 at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
 at System.Data.OleDb.OleDbConnection.Open()
</code></pre>

<p>The code part is below;</p>

<pre><code>var accessConnection = new OleDbConnection(connectionString);
accessConnection.Open();
</code></pre>

<p>And ConnectionString is</p>

<pre><code>Provider=Microsoft.ACE.OLEDB.12.0;Data Source="C:\Users\Me\Desktop\ExportTest.xls";Extended Properties="Excel 8.0;HDR=Yes";
</code></pre>

<p>How can I solve it?</p>