Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-02-23
2
Medium Priority
?
1,128 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 2000 total points
ID: 35021661
0

Featured Post

Industry Leaders: 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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

824 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