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

  • Question

  • I have changed to a new computer, a dell 64 bit with 8 GB of memory.  The program runs great on old machine and I receive this error on new machine. Please help?

    {Microsoft.VisualBasic.ErrObject}

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

        Erl: 0

        HelpContext: 0

        HelpFile: ""

        LastDllError: 203

        Number: 5

        Source: "System.Data"

    My Code is as follows:

    Imports System.Data

    Imports System.Data.OleDb

     

    Public Class Form1

     

        Dim con As OleDb.OleDbConnection = New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\charlie\Documents\video_ddv.accdb")

      

        Dim cmd As OleDbCommand

        Dim RDR As OleDb.OleDbDataReader

     

     

        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

            Try  ' Set up structured error handling.

                con.Open()

                cmd = New OleDbCommand("select * from video", con)

                RDR = cmd.ExecuteReader()

            Catch ex As Exception  ' If error display message

                MsgBox("There was an error opening the Database File, Press any key to cancel")

                Return

     

            Finally

                ' no error set up loop to read this database

            End Try

     

        End Sub

     

    Monday, July 20, 2009 2:58 AM

Answers

  • Mark all posts that provided you with the answer please so we can move on .
    Coding for fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
    • Marked as answer by sorokateam Tuesday, July 21, 2009 10:24 PM
    Tuesday, July 21, 2009 9:10 PM

All replies

  • Your app must target the x86 32bit OS

    http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvb/thread/4159ee56-bdf5-4226-be43-6a39dfaac326/

    http://www.clariusconsulting.net/blogs/kzu/archive/2007/11/15/41639.aspx


    Coding for fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
    • Edited by bdbodger Monday, July 20, 2009 5:11 AM
    • Proposed as answer by Speedbit Monday, November 9, 2009 9:16 AM
    Monday, July 20, 2009 5:02 AM
  • Just a further explanation, a 64-bit database engine for Microsoft Access is currently not available and by default .NET apps compile for "any cpu" and run under the native OS environment, in this case 64-bit. This is why you need to explicitly target the application for 32-bit (x86 option), so it will run under 64-bit WOW (Windows on Windows, the 32-bit environment).

    Hope that's clearer than mud. :-)
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Monday, July 20, 2009 4:08 PM
  • Thank you for the replies, I want to mention that I have access installed and was able to edit the data in access 2007 and it works ok.  Question what menu option do I set the configuration manager on to set the x86 target platform in visual basic 2008 express.
    Tuesday, July 21, 2009 3:43 AM
  • Tools-options to show option dialog . On Projects and solutions find checkbox for show advanced build configurations . Check it then close options . Then on build menu open configuration manager . On the left dropdown choose new . Name it x86 copy settings from box choose release . Press ok . On platform dropdown choose x86 , configuration dropdown should already say x86 if it does not choose it then close .


    Coding for fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
    Tuesday, July 21, 2009 3:52 AM
  • Thank you for the replies, I want to mention that I have access installed and was able to edit the data in access 2007 and it works ok.  Question what menu option do I set the configuration manager on to set the x86 target platform in visual basic 2008 express.

    You can find a step-by-step method in the below forum post:

    http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvb/thread/5392ea5f-4792-4579-a831-5663f517d965/


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Tuesday, July 21, 2009 4:46 AM
  • Thank you so much for the help, I selected the show advanced build configurations and I was able to select the configuration manager which was dimmed prior to this change.  My question is the platform states " Any CPU ", other selections are " New or Edit ", should this say X86 ?
    Tuesday, July 21, 2009 4:08 PM
  • I just selected the platform " X86 " and everything works great, Thank you so much for all the help.

    Charlie
    Tuesday, July 21, 2009 4:12 PM
  • Mark all posts that provided you with the answer please so we can move on .
    Coding for fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
    • Marked as answer by sorokateam Tuesday, July 21, 2009 10:24 PM
    Tuesday, July 21, 2009 9:10 PM
  • You just don't get it do you please the the FAQ at the top of the page

     Need Help with Forums? (FAQ)  about points and giving members the credit they deserve .
    Coding for fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
    Tuesday, July 21, 2009 10:47 PM
  • Tools-options to show option dialog . On Projects and solutions find checkbox for show advanced build configurations . Check it then close options . Then on build menu open configuration manager . On the left dropdown choose new . Name it x86 copy settings from box choose release . Press ok . On platform dropdown choose x86 , configuration dropdown should already say x86 if it does not choose it then close .


    Coding for fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful

    I tried this. When I click on the Platform dropdown, x86 is not an option.

    chris
    Tuesday, August 4, 2009 8:22 PM
  • Did you check the link from my prior post on how to add this option?

    http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvb/thread/0a86923c-626c-43b8-bd20-7654e36dc819/


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Tuesday, August 4, 2009 9:43 PM
  • BINGO!

    DUDE, I owe you a case of cold brew! That solved the problem! All I did was go into the project properties and select x86 as the platform target (instead of any CPU) then run the app and the enraging

    "Error opening database: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine."

    error was GONE!

    I can now connect my app to the access db.mdb file without issue and continue the development process!

    AWESOME!

    Thank you so much!

    Wulf :-)

     


    • Proposed as answer by Wulf Maer Friday, October 28, 2011 9:20 PM
    • Edited by Wulf Maer Friday, October 28, 2011 9:21 PM
    Friday, October 28, 2011 9:20 PM
  • Hi  All,

    Above steps did not work in my system - WIN7 64 bit and Office 32-Bit configuration,

    I see lot of green replies but if still does not work, IIS Settings needs tweaking as suggested-- IIS  should be running in 32-bit Mode, as suggested in

    http://blogs.msdn.com/b/akshayns/archive/2010/11/29/getting-error-quot-the-microsoft-ace-oledb-12-0-provider-is-not-registered-on-the-local-machine-quot.aspx

    Thanks

    HydTechie


    HydPhani

    Thursday, December 6, 2012 12:28 PM