未处理System.Data.OleDb.OleDbException
HResult=-2147467259
Message=外部数据库驱动程序 (1) 中的意外错误。
Source=Microsoft JET Database Engine
ErrorCode=-2147467259
StackTrace:
在 System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
在 System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
原因:
由于微软在2017-10-10更新了安全补丁(
KB4041678,
KB4041681),两个补丁的更新内容中,都包含有这个更新内容(Security updates to Microsoft Windows Search Component, Windows kernel-mode drivers, Microsoft Graphics Component, Internet Explorer, Windows kernel, Windows Wireless Networking,Microsoft JET Database Engine, and the Windows SMB Server.)。其中我们注意到,由更新了Microsoft JET Database Engine。
在补丁的下面有说此次更新会导致的问题(如下),由此我们可以知道,是这个补丁导致的问题。
Installing this update may cause applications based on theMicrosoft JET Database Engine (Microsoft Access 2007 and older or non-Microsoft applications) to fail whencreating or opening Microsoft Excel .xls files. The error message is, “Unexpected error from external database driver (1). (Microsoft JET Database Engine)”.
补丁后续说会及时更新这个问题。
解决方案:
参考资料:
System.Runtime.InteropServices.COMException (0x8007065E): Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 8007065e 这个类型的数据不受支持。 (Exception from HRESULT: 0x8007065E).
System.Runtime.InteropServices.COMException (0x800AC472): Exception from HRESULT: 0x800AC472
at Microsoft.Office.Interop.Excel._Application.Quit()
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {40942A6C-1520-4132-BDF8-BDC1F71F547B} failed due to the following error: 80040154 没有注册类 (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
System.Runtime.InteropServices.COMException (0x8007065E): Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 8007065e 这个类型的数据不受支持。 (Exception from HRESULT: 0x8007065E).
原因是国产软件wps office的流氓行为,强制更改微软office的com组件关联
解决办法:
1、安装wps office,重启,卸载wps office,重启
2、卸载微软office,重启
3、安装微软office,重启