Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

Posted on 2011-02-23
2
1,091 Views
Last Modified: 2012-08-14
We have new machines that are now throwing this error:

Exception Message is:: Generic exception thrown at step:: DataAccessFunctions::getImportSpectSpreadsheet::Execute importss.  Exception Message is:: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.

We have changed the platform in VS2005 to x86 and the issue occurs.

It works ok on WIndows XP with Office 2007 installed, however the error message above occurs when on windows 7 64 bit and Office 2010.

We have attempted and installed the Microsoft Access Database Engine 2010 Redistributable attempting to repair the issue.  Here is the code, it should be noted that we have attempted variations :

Provider=Microsoft.ACE.OLEDB.12.0, Extended Properties=Excel = 8.0
Provider=Microsoft.ACE.OLEDB.14.0, Extended Properties=Excel = 08.0
Provider=Microsoft.ACE.OLEDB.14.0, Extended Properties=Excel = 12.0




    Public Function importSS(ByRef filepath As String) As DataTable
        Try
            Dim strConnection As System.Data.OleDb.OleDbConnection

            Dim dsData As New DataSet
            Dim dt As New DataTable
            Dim objAdapter As System.Data.OleDb.OleDbDataAdapter

            strConnection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source='" & filepath & " '; " & "Extended Properties=Excel 8.0;")
            strConnection.Open()
            dt = strConnection.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, Nothing, Nothing})
            objAdapter = New System.Data.OleDb.OleDbDataAdapter(String.Format("SELECT * FROM [{0}]", dt.Rows(0).Item("TABLE_NAME")), strConnection)
            Dim dt1 As New DataTable
            objAdapter.Fill(dt1)
            Return dt1
        Catch ex As Exception
            Throw ex
        End Try
    End Function

Thanks for any help you can provide
0
Comment
Question by:vdsIT
2 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 34969304
I am not 100% sure, but if you have 2010, then you can't use the 12.0 library, you would need to use the 14.0 provider.  It might be possible to find the 12.0, if you start with the 14.0, and then let the probe find the correct version from there...

0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 35021661
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question