.NET 6和OLEDB

发布于 2025-02-04 04:41:56 字数 458 浏览 1 评论 0原文

我有一个程序(.NET Framework 4.6),该程序通过OLEDD读取和更新Excel电子表格。

我使用system.data.oledb(6.0.0)软件包将此代码移植到.NET 6解决方案。 它在我的开发PC(Win 10)上正常工作,但是当我将其上传到部署服务器(Windows Server 2016)时,我会收到错误:

数据提供商需要Microsoft数据访问组件(MDAC)。 请安装Microsoft数据访问组件(MDAC)版本2.6或 后来。

.NET Framework 4.6应用程序在部署服务器上工作正常。

我已经安装了:

  • accessDatabaseEngine2016.exe
  • mdac28sdk.msi

my .net 6应用程序以32位模式运行,

我缺少什么?

I have a program (.Net Framework 4.6) that reads and updates excel spreadsheet via OleDd.

I have ported this code to .Net 6 solution using the System.Data.OleDb (6.0.0) package.
It works fine on my development pc (Win 10), but when I upload it to deployment server (Windows server 2016) I get error:

The data providers require Microsoft Data Access Components (MDAC).
Please install Microsoft Data Access Components (MDAC) version 2.6 or
later.

The .Net Framework 4.6 app is working on the deployment server just fine.

I have installed:

  • AccessDatabaseEngine2016.exe
  • mdac28sdk.msi

My .Net 6 app is running in 32Bit mode

What am I missing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

用心笑 2025-02-11 04:41:56

关于一个.NET_6项目,我正在使用C#进行64位视觉工作室的工作,并且我对此感到非常麻烦,好吧,阅读您的问题文本使我现在专门为32位而不是建造了我的项目,而不是为我重建这个项目。任何”。这解决了my_pending问题,以获取ole.db成功打开了M $ Access的A_Connection,该访问已安装为32位M $ Office的一部分。最终以这种方式遇到我的ole.db是一种解脱(经过了很多小时之后),但是事后看来,我很惊讶以前,以.net Framework v4.8,我似乎不需要这种位准确性。
因此,对于它的价值,至少在我的情况下,叮咬对于在.net_6下工作的ole.db至关重要且至关重要。

Regarding a .NET_6 project I'm working on under 64bit Visual Studio with C#, and which I was in_serious trouble with, well, reading your question text brought me to rebuild this project of mine now specifically for 32-bit instead of building for "Any". This solved my_pending problem to get OLE.DB successfully opening a_connection to M$Access, which had been installed as part of 32-bit M$Office. It was a relief to finally get across my OLE.DB hurdle this way (after a good number of hours), but in hindsight I am surprised that earlier on, with .Net Framework v4.8, I can't seem to have needed this sort of bitwise accuracy.
So for what it's worth, at least in my case bitlevels were essential and crucial to get OLE.DB working under .NET_6.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文