error when trying to connect to access database RRS feed

  • Question

  • i have read alot of threads about this error and cannot find an explanation.

    im using Visual Studio 2010 and trying to access a database made in access 2010, i get this error:

    the 'microsoft.ace.oledb.12.0' provider is not registered on the local machine

    i have also tried just adding the connectionstring code, but it doesnt work


    //opens connection to DB and sets connection string

                OleDbConnection connect = new OleDbConnection();

                connect.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=G:\Student.accdb;Persist Security Info=False;";




    i have also tried using this but i get the same error :(


    please help me i cannot work out what is causing this error

    P.S. i am using legit versions of VS and Access :)
    • Edited by MaxJordan91 Tuesday, December 6, 2011 11:03 PM
    Tuesday, December 6, 2011 10:58 PM


All replies

  • What is the exact error message?

    Do you have the right to your mdb file?

    Has the Access file open in exclusive mode?


    Wednesday, December 7, 2011 4:11 AM
  • the error is:

    "the 'microsoft.ace.oledb.12.0' provider is not registered on the local machine"

    i have just tried linking to a .accdb at college and it works fine with no error..

    so its something to do with the settings on my home pc i guess?

    thanks for the reply 

    Wednesday, December 7, 2011 2:09 PM
  • Hi MaxJordan,

    Welcome to the MSDN forum!

    Please refer to the following link:

    "After quite long time goolgling,I found out that it is because I am running 64-bit windows and there are no MS Access drivers that run 64 bit.So to resolve it you need to change the build configuration to x86 found in the programs properties.

    To do so,right click on the project and click Propertiesprojectperperties

    Then click on Build and change the Platform target from Any CPU to x86.Recompile your  program , it works like charm.

    Another Solution is to install the 64 bit driver for Access Database Engine.

    64 bit requires Microsoft Access Database Engine 2010 Redistributable (AccessDatabaseEngine_x64.exe)"
    Hope it helps!
    Have a nice day!

    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us

    Thursday, December 8, 2011 9:08 AM
  • Hey thanks for the reply.

    my program was already set to run as x86 :( and i have installed the ms access engine and it didnt do anything..

    maybe ifi try changing my program to any CPU?


    alsoas your an admin i think its appropriate to tell you, on an iphone the submit button doesnt work. it simulates the click and gets greyed out, but doesnt actually submit the reply/ message. just a heads up :)


    • Edited by MaxJordan91 Thursday, December 8, 2011 3:13 PM
    Thursday, December 8, 2011 3:12 PM
  • Hi MaxJordan,
    Thank you for your response.

    I am sorry for that I should have made it clear to you.

    What is the version of your operation system? Is it 32-bit or 64-bit?

    If your operation system is 64, then you should download the 64 version of the Microsoft Access Database Engine 2010.

    Please refer to the following link:


    By the way, for your feedback of the forum's usage on iphone, I guess, it may due to the recently unstable network of the forum, which as you may have known.

    Please see:

    You can try to test it again, since it has now been stable.( Since I haven't got a iphone and my poor phone could not even connect to the msdn site, I can't reproduce the issue. )

    If the issue occurs again, you can start the threads in the following forum:

    Forums Issues (not product support)


    If you have any questions on our original issue, please feel free to let us know.

    Have a nice day!


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us

    • Edited by Dummy yoyoModerator Wednesday, December 21, 2011 9:15 AM
    • Proposed as answer by saranyim Wednesday, December 21, 2011 9:34 AM
    Friday, December 9, 2011 6:16 AM
  • yeh im 64-bit windows, i set the properties to x86 (they already were, wasn't defaulted to "any CPU")

    i also have the access engine installed, which from what i can see has done nothing :(

    here's some screenshots to show i am doing everything the forums have told me to do correctly

    thanks for all the help with this, i dont see why it cant be simpler!


    Friday, December 9, 2011 12:13 PM
  • Hi,

    Any update on this issue?

    Have you tried to hard code the data - connection?


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Wednesday, December 21, 2011 9:18 AM
  • yes i did originally try coding the data connection because i was following a tutorial.

    but yes i did manageto resolvethe issue and made a new thread explaining it here:


    hope that helps, thanks.


    Wednesday, December 21, 2011 5:25 PM
  • Hi Max,

    Thank you for sharing the solution with all of us in the MSDN forum! 

    Have a nice day!


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Wednesday, December 21, 2011 11:48 PM
  • Thanx a lot.
    Wednesday, April 4, 2012 9:55 AM
  • thanks Mr. Yoyo Jiang this solution worked for me.
    Monday, April 15, 2013 12:07 PM
  • It's works for me thanks!
    Saturday, June 29, 2013 10:01 AM
  • from:

    this isntalled fixed my issue

    1. download and install this:

    Thanks/Regards, Mike DePouw

    Monday, May 18, 2015 12:18 PM
  • I had the same error  microsoft.ace.oledb.12.0' on windows 8.1 and office 2013, and it worked with ease. 

    no problems at all. thank you for the support.

    • Edited by benjed Wednesday, February 24, 2016 9:45 PM
    Wednesday, February 24, 2016 9:45 PM
  • thank you for your post: HOW TO: FIX ERROR - "the 'microsoft.ace.oledb.12.0' provider is not registered on the local machine"

    this is still working and fixing issues, thanks for posting, saved me many hours of figuring this out I'm sure.

    Friday, November 11, 2016 7:30 PM
  • Hi,

    I have installed the driver

    on the client 64 bit client PC. Trying to read a flat file through OPENROWSET.  

    SELECT * FROM OPENROWSET ('Microsoft.ACE.OLEDB.12.0', 'Text;Database=C:\Delme; ', 'SELECT * FROM input.csv')

    Getting below error.

    Msg 7403, Level 16, State 1, Line 8

    The OLE DB provider "Microsoft.ACE.OLEDB.12.0" has not been registered.

    Please help. Trying multiple options but not successful so far. 

    Thursday, March 28, 2019 11:26 PM
  • What are the following setting?

    Also you might try removing the reference for Microsoft.Office.Interop.Access and use the following NuGet package.

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    profile for Karen Payne on Stack Exchange

    Friday, March 29, 2019 12:31 AM
  • The link seems to be outdated. Is there an update? 

    The link does not work either.

    Eugen Sum

    Tuesday, April 16, 2019 8:43 PM