Solved

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

Posted on 2011-02-23
2
1,095 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP/VB email question 4 63
Retrieve Active Directory Groups a User belongs to in VB.NET 3 53
ModalPopup  question 22 39
Need help with a query 14 40
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

730 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