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

  • Question

  • Hi everybody,
    I have a problem with Windows 8 Pro x64, Microsoft Office 2013 Professional x64 and Visual Studio 2008 SP1:
    "The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine."

    This is mi string connection:
    If strExtensionFile = ".xls" Then
       strConnection = String.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=""Excel 8.0;HDR=Yes;IMEX=2""", strPathFile)
    ElseIf strExtensionFile = ".xlsx" Then
       strConnection = String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 12.0;HDR=Yes;IMEX=0""", strPathFile)

    End If

    and this is mi code:
    Dim objOleDbConnecction As New OleDbConnection(strConnection)
    Dim objOleDbCommand As OleDbCommand = New OleDbCommand()
    objOleDbCommand.CommandType = CommandType.Text
    objOleDbCommand.Connection = objOleDbConnecction
    Dim objOleDbDataAdapter As New OleDbDataAdapter(objOleDbCommand)
    Dim tblExcelRecords As New DataTable()
    Dim tblExcelSheetName As DataTable = objOleDbConnecction.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, Nothing)
    Dim strExcelSheetName As String = tblExcelSheetName.Rows(0)("tblFractions").ToString()
    objOleDbCommand.CommandText = String.Format("SELECT * FROM [{0}]", strExcelSheetName)
    objOleDbDataAdapter.SelectCommand = objOleDbCommand


    code fails when execute Open() method.

    I installed Microsoft Access 2010 Database Engine and when I try to update to Service Pack 1 for Microsoft Access Database Engine 2010 (KB2460011) 64-bit Edition I receive an error: "CODE 8024002D".

    Thanks in advance for your help

    Friday, November 23, 2012 1:59 AM


All replies