我试图在Visual Studio 2008中使用Jet连接到Access数据库,就像这样 -
dbProvider =“PROVIDER = Microsoft.Jet.OLEDB.4.0;”
然后找到要读取的源文件并打开和关闭它 -
con.Open() con.Close()
但是,我在运行时收到错误消息 -
''Microsoft.Jet.OLEDB.4.0'提供商未在本地计算机上注册'
我正在运行Windows 7,msjet40.dll位于窗口的SysWOW64文件夹中。
任何建议都会非常感激,欢呼。
答案 0 :(得分:3)
这可能意味着您尝试将32位应用程序连接到64位驱动程序或反之。因此,您需要更改exe的位数,或者安装相应的访问驱动程序:Microsoft Access Database Engine 2010 Redistributable
答案 1 :(得分:-3)
Jet在X64上无法原生工作..但是SQL Server可以!〜
如何获得Jet的x64版本? http://blogs.msdn.com/b/psssql/archive/2010/01/21/how-to-get-a-x64-version-of-jet.aspx
我们有很多人询问他们如何将Jet ODBC驱动程序/ OLE DB提供程序作为64位。 Windows仅提供这些版本的32位版本。答案是Windows版本不会是x64,因为这些项目已被弃用。弃用的含义是什么?以下是MSDN上MDAC / WDAC路线图的摘录:
Deprecated MDAC/WDAC Components
These components are still supported in the current release of MDAC/WDAC, but they might be removed in future releases. Microsoft recommends, when you develop new applications, that you avoid using these components. Additionally, when you upgrade or modify existing applications, remove any dependency on these components.
以下列出了有关Jet数据库引擎的内容:
Microsoft Jet Database Engine 4.0: Starting with version 2.6, MDAC no longer contains Jet components. In other words, MDAC 2.6, 2.7, 2.8, and all future MDAC/WDAC releases do not contain Microsoft Jet, the Microsoft Jet OLE DB Provider, the ODBC Desktop Database Drivers, or Jet Data Access Objects (DAO). The Microsoft Jet Database Engine 4.0 components entered a state of functional deprecation and sustained engineering, and have not received feature level enhancements since becoming a part of Microsoft Windows in Windows 2000.
There is no 64-bit version of the Jet Database Engine, the Jet OLEDB Driver, the Jet ODBC Drivers, or Jet DAO available. This is also documented in KB article 957570. On 64-bit versions of Windows, 32-bit Jet runs under the Windows WOW64 subsystem. For more information on WOW64, see http://msdn.microsoft.com/en-us/library/aa384249(VS.85).aspx. Native 64-bit applications cannot communicate with the 32-bit Jet drivers running in WOW64.
Instead of Microsoft Jet, Microsoft recommends using Microsoft SQL Server Express Edition or Microsoft SQL Server Compact Edition when developing new, non-Microsoft Access applications requiring a relational data store. 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.