问题标签 [aceoledb]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1236 浏览

64-bit - 64 bit ACE OLEDB provider causes access violation in SysFreeString

My application uses MS Access mdb files because of legacy reasons. It connects to the database using ADO with the following connection string:

Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=Dummy.mdb

Recently I started porting my application to 64 bit. Because of that Jet OLEDB provider is not available on 64 bit systems I used ACE OLEDB provider with the following connection string:

Provider=Microsoft.ACE.OLEDB.12.0;Persist Security Info=False;Data Source=Dummy.mdb

The application also uses MS XML DOM to work with XML files. Sometimes the 64 bit version crashes with access violation exception in SysFreeString which is called from one of the MS XML wrapper methods. The 32 bit version does not have these problems. I distilled the problem into the tester applicaiton.

The crash call stack is the following:

At the crash the DB thread is always in the following state:

I found that as a workaround if I keep one open connection to some empty database file, I can open and close connections to actual database files and the application does not crash. Anyway I would rather understand the actual cause of the crash. I would appreciate any suggestions.

My configuration is the following:

Microsoft Visual Studio 2005 Version 8.0.50727.4039 (QFE.050727-4000)
Windows Server 2008 R2 Standard 64 bit
Processor: Intel(R) Xeon(R) E5645 @ 2.40GHz
Memory: 16.0 GB

0 投票
1 回答
42 浏览

c# - 没有为所需参数提供值

我正在尝试制作一个使用帐号更新帐户昵称的按钮,但出现错误。

在此处输入图像描述

0 投票
1 回答
69 浏览

c# - 两个程序试图读取 excel 一个成功一个失败,代码相同

我有两个彼此无关的程序,但它们具有相同的方法,它们尝试从 excel 文件中读取行。

程序 1

节目二

现在奇怪的是第一个程序可以在同一台电脑上完美运行,而第二个程序收到一个错误,说电脑上没有可安装的 ISAM。有什么建议么?

0 投票
0 回答
162 浏览

sql - 获取链接服务器“(null)”的错误“Microsoft.ACE.OLEDB.12.0”。将数据从 Excel 导入 SQL 时

将数据从 Excel 工作表导入 SQL Server Management Studio 2012 时出现以下错误。

无法为链接服务器“(null)”初始化 OLE DB 提供程序“Microsoft.ACE.OLEDB.12.0”的数据源对象。

我尝试了所有可用的建议,但仍然无法解决错误。

你能帮帮我吗?

0 投票
11 回答
324195 浏览

sql-server - 'Microsoft.ACE.OLEDB.16.0' 提供程序未在本地计算机上注册。(系统.数据)

当我尝试通过 MSSQL Server 数据导入即 SSIS 包连接到任何 excel 时出现此错误Microsoft.ACE.OLEDB.16.0提供程序未在本地计算机上注册。( System.Data)

它不是同一个版本,我认为需要其他一些补丁

0 投票
1 回答
2221 浏览

c# - 仅从 Excel (ACE OLEDB) 中获取特定列

我正在使用 ACE OLEDB 将 excel 文件加载到 DataTable 中。

我有一个需要从文件中获取的列的列表(列名)。

问题是我找不到任何有关如何仅将 Excel 中的特定列放入 DataTable 的工作源。

0 投票
0 回答
344 浏览

c# - 如何使用 ACE.OLEDB.12.0 读取 HTML 文件

我试图用 Microsoft.ACE.OLEDB.12.0 读取 .xls 文件。我可以读取一些文件,但其中一些文件原来是带有 .xls 扩展名的 html 文件并抛出此错误:"External table is not in the expected format."这些 HTML 文件具有如下方案:

我将连接字符串更改 Provider=Microsoft.ACE.OLEDB.12.0; Data Source=file.xls;Extended Properties="HTML Import"为以读取 HTML 文件。但是,它的工作速度非常慢。此外,它会跳过<div>或其他标签,并且只从正式标签中读取<td>。但是 Excel 2013 可以非常快速地打开这样的 HTML 文件,并且不会跳过任何 HTML 标记内容。

如何读取 Excel 读取的 HTML 文件?

0 投票
1 回答
38 浏览

sql - Nested SQL Selects? DISTINCT from one column, and get the corresponding Mode for each value in another?

So say I have this table called Key_Values that looks like

#xA;

I need to write a single select statement that would get all of the distinct keys, and their respective values' mode. It would return this

#xA;

I'm having some trouble figuring out the correct way to do this. I know I can do a DISTINCT(keys), but I'm not sure how to get the values from that.

0 投票
1 回答
709 浏览

c# - 无法使用 ACE OLEDB 访问 Microsoft Access (.accdb) 文件,但可以使用 JET OLEDB 访问 (.mdb) 文件

我正在编写一个 C# 可执行文件,需要检查 Microsoft Access 数据库的给定密码是否正确。它需要能够对 .mdb 文件和 .accdb 文件执行此操作。对于 .mdb,我使用的是 JET OLED,它工作正常,但 JET OLEDB 不支持较新版本的 Microsoft Access,所以我使用 ACE OLEDB,但每次都会出错。以下是相关方法:

当我给它一个.accdb时,输出是:

当我给它一个 .mdb 时,输出是:

我尝试使用全新的 Access 文件,但它仍然给出相同的错误

0 投票
1 回答
278 浏览

c# - 无法访问受密码保护的 Microsoft accdb 数据库 Microsoft.ACE.OLEDB.12.0

Windows 10 笔记本电脑 x64 位

我有 Microsoft Access 2010

安装的驱动程序:

-Microsoft Office Access 数据库引擎 2007(我认为是 32 位)

-Microsoft Access 数据库引擎 2010(我认为是 64 位)

我最近继承了一个 C# 项目(我认为是 .net 4.0),但我在正确设置代码时遇到了麻烦,从我读到的内容来看,这是由于项目使用了(受密码保护的)Microsoft Access 数据库。最初它由一位主要开发人员处理,然后交给我。

安装 2007 Microsoft 驱动程序有助于解决“注册问题”,但我发现该程序无法访问数据库。

运行代码我在下面得到一个错误。

System.Data.OleDb.OleDbException:无法打开数据库“”。它可能不是您的应用程序识别的数据库,或者文件可能已损坏。

我发现如果我打开 Microsoft Access 2010,创建一个空数据库,从原始数据库中导入所有内容,然后在没有密码的情况下保存,那么它似乎运行良好。但是当涉及密码时,它会停止工作

我的 App.Config 文件:

在我的 accesshelper 文件中:

...

该代码适用于原始开发人员,但如果没有像删除密码这样的解决方法(代码上的密码(Abc1234)是正确的。我知道,因为如果我在 Microsoft Access 2010 中打开数据库,我似乎无法重现同样的成功; 我必须输入密码)