Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Wed, 11 Jun 2008 12:05:03 -0700,    group: microsoft.public.dotnet.datatools        back       


Not registered error message   
Hi,
I am trying to deploy a really simple application built on Visual Studio 
2008 using framework 3.5 that consumes an Access 2007 database.
When I deploy it and run my app, I get the following error:
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

Here is the code that's causing the error:
private void ConnectToDB()
    {
      try
      {
        if (_dbConnection.State != ConnectionState.Open)
        {
          _dbConnection.ConnectionString = 
global::MCIS0685.Properties.Settings.Default.MCIS0685DBConnectionString;
          _dbConnection.Open();
        }
      }
      catch(Exception ex)
      {
        MessageBox.Show("Unable to connect to database. Error:\n" + 
ex.Message,
            "Database Connect", MessageBoxButtons.OK, MessageBoxIcon.Error);
      }
    }
The connection variable is defined as:
private OleDbConnection _dbConnection = new OleDbConnection();

This is the configuration file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
    </configSections>
    <connectionStrings>
        <add name="MCIS0685.Properties.Settings.MCIS0685DBConnectionString"
            connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data 
Source=MCIS0685DB.accdb"
            providerName="System.Data.OleDb" />
    </connectionStrings>
</configuration>

The DB file is in the same folder as the executable assembly.

Any ideas?
TIA
date: Wed, 11 Jun 2008 12:05:03 -0700   author:   pgonza02

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us