2011-03-15 61 views
1

我試圖與Jet連接到Access數據庫在Visual Studio 2008中,像這樣連接到一個Access數據庫 -使用Jet

dbProvider = 「PROVIDER = Microsoft.Jet.OLEDB.4.0;」

然後找到我的源文件從開放閱讀和關閉它 -

con.Open() con.Close()

但是,我得到的運行時錯誤消息 -

的‘Microsoft.Jet.OLEDB.4.0’提供者未註冊在本地計算機上

我運行Windows 7,並有msjet40.dll位於窗口SysWOW64中的文件夾。

任何意見將不勝感激,歡呼聲。

回答

-3

噴氣本身並不對X64的工作。但SQL Server會〜

如何獲得一個64位Jet的版本? 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,因爲這些項目已被棄用。棄用的含義是什麼?下面是從MDAC/WDAC路線圖MSDN上的摘錄:

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. 
+2

這個答案是可怕的,完全過時。如果您需要在64位環境中使用Jet數據,則可以使用ACE的64位版本,即Jet 4的後續版本。 –