通过OLEDB连接ACCDB格式的MS-ACCESS数据库 [英] Connecting to ACCDB format MS-ACCESS database through OLEDB
问题描述
我最近提出了关于连接到 MS-ACCESS 数据库的另一个问题C# 或 VB.NET 中的 .NET.它在 MDB 中按预期工作,但在 accdb 中导致了异常
I've recently made another question about connecting to MS-ACCESS database with .NET in C# or VB.NET. It worked just as intended with MDB, but with accdb it caused an exception in
conn.Open();
如下:
替代文字 http://dl.dropbox.com/u/3045472/accdb_fail.png
还有其他方法可以做到这一点吗?我的初衷(如原始问题中所述)正在收集一些(实际上,很多)字段.
Is there another way to do this? My original intention (like stated in the original question) is gathering some (actually, a lot of) fields.
推荐答案
使用ACE 4驱动,下载此处 然后使用以下连接字符串:
Use ACE 4 driver, download it here then use following connection string:
"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:marcelo.accdb;Jet OLEDB:Database Password=MyDbPassword;"
这篇关于通过OLEDB连接ACCDB格式的MS-ACCESS数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!