Solved

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

Posted on 2011-02-23
2
1,100 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
[X]
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
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

695 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