Office 365更新后OLEDB错误 [英] OLEDB Error After Office 365 updates

查看:305
本文介绍了Office 365更新后OLEDB错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我们有一些用于读取excel文件的oledb代码(.xls和.xlsx),这些代码已经运行了多年,但似乎在过去多次更新之后一年,ole适配器填充现在引发异常。目前还不清楚这是由于oleadapter更新,
.net框架更改还是其他原因。

We have some oledb code for reading excel files (both .xls and .xlsx) and these worked for years but it appears that after multiple updates in the past year, the ole adapter fill now raises an exception. It is unclear if this is due to an oleadapter update, .net framework changes or something else.

代码如下所示:

此代码在"oda.Fill(tbContainer)"行上始终失败。但是,它已经工作了几年,直到最近的Microsoft更新被应用。

This code consistently fail on the line "oda.Fill(tbContainer)". However, it has worked for a few years until recent Microsoft updates were applied.

第二个观察是这个代码在没有所有类似更新的计算机上运行时在调试模式下运行(即在IDE中)但是当编译的可执行文件独立于IDE运行时失败。

A second observation is that this code works on a computer without all the similar updates when run in debug mode (i.e. within the IDE) but fails when the compiled executable is run independent of the IDE.

是否有人遇到过同样的问题。 我们需要了解解决此问题需要采取的建议解决方案或步骤吗?

Has anyone experience this same issue.  Suggested solutions or steps that we need to take to resolve this issue would be appreciated?




推荐答案

您好qtrader,

Hi qtrader,

感谢您发布在这里。

对于你的问题,我测试你在2016年办公室提供的代码。它对我很有用,没有任何例外。你能提供更多细节吗?你从下面的代码得到的例外是什么?

For your question, I test the code you provided in office 2016. It works well for me without any exception. Could you provide more details? What is the exception you get from the code below?

      oda.Fill(tbContainer);

什么是你更新的版本?

最好的问候,

Wendy


这篇关于Office 365更新后OLEDB错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆