gpt4 book ai didi

c# - 64 位模式不支持 OleDB?

转载 作者:可可西里 更新时间:2023-11-01 07:52:46 25 4
gpt4 key购买 nike

我一直在使用 Microsoft.Jet.OLEDB.4.0 和 Microsoft.ACE.OLEDB.12.0 读取 .csv、.xls 和 .xlsx 文件。

我刚刚发现原生 64 位模式不支持这两种技术!

我有两个问题:

  1. 支持的方式是什么以编程方式读取 .csv、.xls 和64 位模式下的 .xlsx 文件。我只是在任何地方都找不到这个问题的答案。

  2. 如果我无法读取所有三个文件类型,什么是最好的阅读方式在 64 位的 .csv 文件中环境?

注意事项:

  • 我正在使用 .NET (3.5p1)
  • 这是一款收缩包装应用;再分配是关键因素。

更新:

我可以使用 CorFlags 强制应用程序在 32 位模式下运行,这可行,但不可取。

最佳答案

这里讨论要做什么about deprecated MDAC .恐怕答案不是很令人满意......

These new or converted Jet applications can continue to use Jet with the intention of using Microsoft Office 2003 and earlier files (.mdb and .xls) for non-primary data storage. However, for these applications, you should plan to migrate from Jet to the 2007 Office System Driver. You can download the 2007 Office System Driver, which allows you to read from and write to pre-existing files in either Office 2003 (.mdb and .xls) or the Office 2007 (*.accdb, *.xlsm, *.xlsx and *.xlsb) file formats. IMPORTANT Please read the 2007 Office System End User License Agreement for specific usage limitations.

Note: SQL Server applications can also access the 2007 Office System, and earlier, files from SQL Server heterogeneous data connectivity and Integrations Services capabilities as well, via the 2007 Office System Driver. Additionally, 64-bit SQL Server applications can access to 32-bit Jet and 2007 Office System files by using 32-bit SQL Server Integration Services (SSIS) on 64-bit Windows.

关于c# - 64 位模式不支持 OleDB?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/861022/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com