2014-12-09 9 views
0

Microsoft Access 데이터베이스에 정보를 쓰는 프로그램을 사용하는 데 문제가 있습니다. 문제는 내가 데이터베이스 쿼리를 실행하려고 할 때마다, 나는 다음과 같은 오류 얻을 것이다 : 나는 다운로드 및 MS 액세스 데이터베이스 엔진 꼬추 (http://www.microsoft.com/en-us/download/confirmation.aspx?id=13255)를 설치 시도'Microsoft.Jet.OLEDB.4.0'공급자가이 컴퓨터에 등록되지 않았습니다.

Error

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box. 

************** Exception Text ************** 
System.InvalidOperationException: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. 
    at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) 
    at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) 
    at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) 
    at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) 
    at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) 
    at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) 
    at System.Data.OleDb.OleDbConnection.Open() 
    at PA_SHALER_HIGH_SCHOOL.frmAnimalInput.btnSave_Click(Object sender, EventArgs e) 
    at System.Windows.Forms.Control.OnClick(EventArgs e) 
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) 
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) 
    at System.Windows.Forms.Control.WndProc(Message& m) 
    at System.Windows.Forms.ButtonBase.WndProc(Message& m) 
    at System.Windows.Forms.Button.WndProc(Message& m) 
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) 
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) 


************** Loaded Assemblies ************** 
mscorlib 
    Assembly Version: 2.0.0.0 
    Win32 Version: 2.0.50727.8009 (FX35W81RTMGDR.050727-8000) 
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll 
---------------------------------------- 
PA_SHALER HIGH SCHOOL 
    Assembly Version: 1.0.0.0 
    Win32 Version: 1.0.0.0 
    CodeBase: file:///C:/Users/David/Desktop/PA_SHALER%20HIGH%20SCHOOL.exe 
---------------------------------------- 
Microsoft.VisualBasic 
    Assembly Version: 8.0.0.0 
    Win32 Version: 8.0.50727.8007 (FX35W81RTMGDR.050727-8000) 
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll 
---------------------------------------- 
System 
    Assembly Version: 2.0.0.0 
    Win32 Version: 2.0.50727.8009 (FX35W81RTMGDR.050727-8000) 
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll 
---------------------------------------- 
System.Windows.Forms 
    Assembly Version: 2.0.0.0 
    Win32 Version: 2.0.50727.8008 (FX35W81RTMGDR.050727-8000) 
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll 
---------------------------------------- 
System.Drawing 
    Assembly Version: 2.0.0.0 
    Win32 Version: 2.0.50727.8007 (FX35W81RTMGDR.050727-8000) 
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll 
---------------------------------------- 
System.Configuration 
    Assembly Version: 2.0.0.0 
    Win32 Version: 2.0.50727.8007 (FX35W81RTMGDR.050727-8000) 
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll 
---------------------------------------- 
System.Xml 
    Assembly Version: 2.0.0.0 
    Win32 Version: 2.0.50727.8009 (FX35W81RTMGDR.050727-8000) 
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll 
---------------------------------------- 
System.Runtime.Remoting 
    Assembly Version: 2.0.0.0 
    Win32 Version: 2.0.50727.8012 (FX35W81RTMGDR.050727-8000) 
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll 
---------------------------------------- 
System.Data 
    Assembly Version: 2.0.0.0 
    Win32 Version: 2.0.50727.8007 (FX35W81RTMGDR.050727-8000) 
    CodeBase: file:///C:/WINDOWS/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll 
---------------------------------------- 
System.Transactions 
    Assembly Version: 2.0.0.0 
    Win32 Version: 2.0.50727.8007 (FX35W81RTMGDR.050727-8000) 
    CodeBase: file:///C:/WINDOWS/assembly/GAC_64/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll 
---------------------------------------- 

************** JIT Debugging ************** 
To enable just-in-time (JIT) debugging, the .config file for this 
application or computer (machine.config) must have the 
jitDebugging value set in the system.windows.forms section. 
The application must also be compiled with debugging 
enabled. 

For example: 

<configuration> 
    <system.windows.forms jitDebugging="true" /> 
</configuration> 

When JIT debugging is enabled, any unhandled exception 
will be sent to the JIT debugger registered on the computer 
rather than be handled by this dialog box. 

을하지만 그렇지가 일했다. 문제가 무엇입니까? Windows 8.1 Pro x64를 사용하고 있으며 Visual Studio 2013 Ultimate을 사용하여 프로그램을 작성했습니다. 또한 프로그램을 코딩 할 때 제대로 작동했음을 알리고 Windows 7 Enterprise x86에서 제대로 작동한다고 말할 수 있습니다.

+0

가능한 복제본 [Microsoft.Jet.OLEDB.4.0 '공급자가 로컬 컴퓨터에 등록되지 않았습니다] (http://stackoverflow.com/questions/1991643/microsoft-jet-oledb-4-0-provider-is) 로컬 머신에 등록되지 않은) – houssam

답변

0

.NET Framework의 최신 버전을 사용하도록 프로젝트를 조정하여이 문제를 해결할 수있었습니다. StackOverflow에 게시하기 전에 64 비트 용 Access 데이터베이스 엔진을 다운로드하는 houssam의 솔루션을 시도했지만 작동하지 않았습니다.

0

는 64 비트 (AccessDatabaseEngine_x64.exe)에 대한 액세스 엔진을 다운로드해야합니다 :
http://download.microsoft.com/download/2/4/3/24375141-E08D-4803-AB0E-10F2E3A07AAA/AccessDatabaseEngine_x64.exe
또는 프로젝트의 대상 플랫폼 대신에서 "모든 CPU"의 86을 구성 할 수 있습니다
비주얼 스튜디오 -> 프로젝트 메뉴 -> youProjectName 속성 -> 컴파일 탭 -> 고급 컴파일 옵션 -> 대상 CPU = x86 -> 확인 -> 확인을 누릅니다.