none
The 'Microsoft.ACE.OLEDB.12.0,Data Source=pathname.accdb' provider is not registered on the local machine. RRS feed

  • Question

  • On a Windows 7 Pro 64bit platform with MS Office Access 2007 SP2 and Visual Studio 2010 the following code fails with the above error.
    I have already ensured that the target plaform is x86. I have tried installing AccessDatabaseEngine 2010 32bit and AccessDatabaseEngine 2007 32bit. With Regedit I can find the following entries. If anybody can help I would be gratful!

    [HKEY_CLASSES_ROOT\Microsoft.ACE.OLEDB.12.0]
    @="Microsoft.ACE.OLEDB.12.0"

    [HKEY_CLASSES_ROOT\Microsoft.ACE.OLEDB.12.0\CLSID]
    @="{3BE786A0-0366-4F5C-9434-25CF162E475E}

      cn = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0,Data Source=xxxx.accdb")
    
    
    
      cn.Open()
     
    Monday, November 15, 2010 12:04 PM

Answers

  • Hello,

    Please try with the following connection string:

    cn = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source=xxxx.accdb")

    The standard connection string of Access 2007 could be found at:
    http://www.connectionstrings.com/access-2007

    Regards,


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    • Marked as answer by MisterB Tuesday, November 16, 2010 10:15 AM
    Tuesday, November 16, 2010 9:59 AM

All replies

  • Hello,

    Thanks for your thread!

    Please try to uninstall those 32bit stuffs and then install AccessDatabaseEngine_X64.exe which is available here.

    Please take a look at the following article, it may help you to troubleshoot the issue:
    http://www.arboundy.com/2010/11/the-microsoft.ace.oledb.12.0-provider-is-not-registered-on-the-local-machine/

    Best regards,


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    • Marked as answer by MisterB Tuesday, November 16, 2010 9:27 AM
    • Unmarked as answer by MisterB Tuesday, November 16, 2010 9:27 AM
    Tuesday, November 16, 2010 6:51 AM
  • Thank you for your reply Roahn. My Office 2007 is 32bit so will not install beside the target platform is 32bit and I am compiling to x86. Are you saying I have to install a 64bit version of office and target AnyCPU?
    Tuesday, November 16, 2010 9:26 AM
  • Hello,

    Please try with the following connection string:

    cn = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source=xxxx.accdb")

    The standard connection string of Access 2007 could be found at:
    http://www.connectionstrings.com/access-2007

    Regards,


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    • Marked as answer by MisterB Tuesday, November 16, 2010 10:15 AM
    Tuesday, November 16, 2010 9:59 AM
  • Thank you Roahn that was the problem! A comma instead of a semi-colon just goes to show how much trouble a missing period can cause! :)
    Tuesday, November 16, 2010 10:17 AM
  • Do agree! Happy coding and may you have a nice day!

    Cheers!


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    Tuesday, November 16, 2010 10:22 AM