首页 > 常见问题解决办法 > 测评软件导出Excel失败解决办法(2)

测评软件导出Excel失败解决办法(2)

2017年10月30日


未处理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更新了安全补丁(KB4041678KB4041681),两个补丁的更新内容中,都包含有这个更新内容(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)”.
补丁后续说会及时更新这个问题。
解决方案:
1、网上的方案是:在控制面板>程序>程序和功能>已安装更新中,找到对应的两个补丁,进行卸载。不同系统对应不同的补丁,具体可以参考:http://www.cnblogs.com/net-god/p/7661313.html
2、微软给出的解决方案是:下载新的驱动引擎(Microsoft Access Database Engine 2010 Redistributable),更改Provider=Microsoft.Jet.OLEDB.4.0为Provider=Microsoft.ACE.OLEDB.12.0。
参考资料:
本文的评论功能被关闭了.