OleDbConnection gets “External component has thrown an exception.”

后端 未结 6 1811
予麋鹿
予麋鹿 2020-12-20 11:44

I\' m using a Windows Forms application to export data to excel.

Application is built both x64 and x86.

So both version of Microsoft Access Databse Engine mu

6条回答
  •  北海茫月
    2020-12-20 12:20

    In my case I had Office 2013 x64 installed. I then installed AccessDatabaseEngine2016_X64.exe after which I installed AccessDatabaseEngine2016.exe using the "/quiet" switch. I found that if I installed the x86 engine first I would get the error you're seeing, so order matters. I also changed my connection strings to Provider=Microsoft.ACE.OLEDB.16.0 (which appears to provide better OleDb error reporting).

    You can verify driver installation using ODBC Data Sources.

提交回复
热议问题