Home > Visual Studio, Window Form > The ‘Microsoft.ACE.OLEDB.12.0′ provider is not registered on the local machine.

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

*************Update on 29 OCT 2011*****************

*********Read at the bottom of this article**************

I recently got an error when trying to use Microsoft.ACE.OLEDB.12.0 to connect excel file.I am sure Microsoft.ACE.OLEDB.12.0 is registered on the local machine,but I keep getting on run time error like this.

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

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

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.

config

*************Update on 5 March 2011*****************

If for some reasons (e.g. migrate import or export function using excel in SharePoint2010,SharePoint2010 only comes with 64 bit), you have to compile your project in 64 bit , you can use the open-XML to do so , but keep in mind only office2007 or above saving the office file in openxml format.Here are the references to get you started.You can download a working example here.

http://www.sadev.co.za/content/reading-and-writing-excel-2007-or-excel-2010-c-series-index

http://msdn.microsoft.com/en-us/library/gg575571.aspx

http://www.microsoft.com/downloads/en/details.aspx?FamilyId=C6E744E5-36E9-45F5-8D8C-331DF206E0D0&displaylang=en

http://openxmldeveloper.org/attachment/1970.ashx

*************Update on 5 March 2011*****************

*************Update on 29 OCT 2011*****************

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)

kick it on DotNetKicks.com

About these ads
  1. August 19, 2009 at 12:48 pm

    Dear sir ,

    This is for windows application . but we are using web application in asp.net with excel 2007 .
    where is this option in web application ?

    • ybbest
      August 19, 2009 at 1:11 pm

      Hi Raj
      I assume that you are using asp.net web site template rather than asp.net web application project.Since you can do the same thing in the asp.net web application.You should use asp.net application instead of website.If you can not change it , I suggest you to create another class library project inside your solution to handle the database access which use Microsoft.ACE.OLEDB.12.0′.You can configure the build target in this separate project.
      Hope it helps.
      Cheers
      Ben

      • zonki
        September 15, 2010 at 9:58 am

        hi ybbest,
        I am having this same issue now as I am trying to upload an XLSX file into an SQL Server table. I have applied the correct Provider for XLSX and it is working well on my local machine. The problem occurs when I deploy the source code to my Development server (running on Windows Server 2003). I have heard about Microsoft Access Database Engine, but it is not allowed to be installed in servers (just desktops) – is there any other work around that I can apply in this case so that I may be able to use the XLSX data uploading work?

  2. dennis
    October 10, 2009 at 10:18 am

    This helped for me, thanks alot

  3. morry
    October 21, 2009 at 1:53 am

    Very helpful, i spent hours changing settings back and fourth whilst googling for an answer to why my DataGridView wouldnt show any data during run-time, although i didnt get the “The ‘Microsoft.ACE.OLEDB.12.0′ provider is not registered on the local machine.” error until I added a button to execute the fill method.

    Anyway thnx for solution.

    btw i had to go into ‘Tools>options>projects & solutions>*show advanced build configurations’ before i could see it in project properties for those who might be having some trouble.

    • ybbest
      October 21, 2009 at 2:22 am

      I am using visual studio 2008 , are you using the same version?

      • Ajmal
        November 7, 2012 at 10:39 pm

        Sir i dont have that Build option..

    • May 25, 2013 at 2:43 am

      Thanks ya thank you so much….We really struggled lot for this option. but your this above
      suggestion helped us well

  4. Shafeeq
    October 22, 2009 at 7:40 pm

    Saved my life! Thank you!!!

  5. Jay
    November 20, 2009 at 4:03 pm

    Thanks Dude! you are the best.

  6. Lloyd Spencer
    November 20, 2009 at 4:47 pm

    Hi, my version of VS 2008 was a bit more difficult to find this, so posting this additional note. After changing this Tools>options>projects & solutions>*show advanced build configurations
    I then had to go to Build>Configuration Manager and change the platform there.
    Then it worked fine. Thanks again for this post; I never would have figured this out!

    • Nilashini
      March 24, 2012 at 6:57 pm

      Yeah! I managed to solve this problem. Thanks alot!!

  7. Irshad
    December 19, 2009 at 7:01 pm

    Thanks dude,
    saved a lot of trouble

  8. Hans Bertilsson
    February 11, 2010 at 9:18 pm

    Thanks! Work like a charm! Has been looking for a solution on this a long time! Once again, Thanks!

  9. Delphi
    February 12, 2010 at 3:07 pm

    Your post is very helpful, except that I went into Visual Studio 2008 C# solution explorer, went into properties and selected Build. I do not see “Platform Target” in my build options. Is that because I’m running Visual Studio Express edition?

    Also, why am I able to connect to an Access database in Delphi 2010 on my Win 7 machine? Does Delphi, by default, output to x86 code?

  10. Nathapon
    February 13, 2010 at 7:19 pm

    thanks a lot for that solution

  11. sidharth
    February 21, 2010 at 9:17 am

    hii dear,
    thanks alott u.i was also too suffering from this problem and your disscussion helped me..

    thnks again
    sidharth

  12. Asad
    March 1, 2010 at 9:15 am

    Hello.
    How can i coonect ms access database with my c# program?

  13. Aulorin
    March 11, 2010 at 3:01 pm

    I just want to say, you are my hero. I was getting so frustrated! Was trying to study for my exams and I just could NOT manage to connect any access database using coding. The SQL Server one worked fine, but this….no way! Thank you so so so so so so so much!

  14. Linda Vonberg
    March 14, 2010 at 10:14 pm

    Whew! I was really starting to get a little aggravated – needed this for an online class and the instructor didn’t seem to understand my problem. YOU ARE A LIFE SAVER!! Thanks so much!

  15. Diogo
    March 18, 2010 at 8:31 pm

    hello

    thanks for the explication… but in the properties of my project i dont see the plantaform…

    you can help me?

    thanks

  16. Hugh
    April 13, 2010 at 10:43 am

    For those that must build 64 bit applications(such as a web part for 64bit sharepoint), Microsoft has provided beta 64bit oledb drivers:http://www.microsoft.com/downLoads/details.aspx?familyid=C06B8369-60DD-4B64-A44B-84B371EDE16D&displaylang=en

    • ybbest
      April 13, 2010 at 10:54 am

      Thanks for this information.

    • April 21, 2010 at 9:06 am

      But even these Beta products are not working for 64-bit, I faced this issue and resolved in alternate ways…

      Check my blog which has the solution

    • Feri
      February 3, 2013 at 6:21 pm

      thank you very much. i installed it and it work for me.
      best regards.

  17. Bob
    April 18, 2010 at 3:40 pm

    Many many thanks

    • April 21, 2010 at 8:52 am

      Without changing the Build options you can connect XLSX files using Open Office XML …

  18. April 22, 2010 at 5:06 am

    Thank you very much, I hope this will help me though I didn’t tried yet. But I’m in the same problem.

    I have developed a desktop application using VS 2008 (C#) and database is Access 2007. My development environment PC is a 32 bit PC. But when I tried to run this in 64 bit machine running windows 7, I got the mentioned error.

    • ybbest
      April 22, 2010 at 10:55 am

      Good luck!

  19. May 11, 2010 at 3:33 am

    Wow… that was really helpful… this solution worked perfectly… was installing on a 64 bit machine..forced the x86 (well hidden but nicely exposed above) and voila..

    bravo.

  20. Nikoel
    May 21, 2010 at 3:59 pm

    For anyone getting the ‘Microsoft.ACE.OLEDB.12.0′ provider is not registered on the local machine error when trying to import an excel file (.xlsx) into SQL Server get the driver download here:

    http://www.microsoft.com/downloads/en/confirmation.aspx?familyId=7554f536-8c28-4598-9b72-ef94e038c891&displayLang=en

  21. Aycan
    May 25, 2010 at 4:39 am

    Hi
    You said that right click on the project ok but i have visual basic project so i can not find build configuration in WindowsApplication1 which i created.

    And how can i find it in my vb project.

    thanks

    • ybbest
      May 25, 2010 at 5:05 am

      In vb,you can right click then click properties then Compile from your left-pane.You can modify your platform there.

      • Aycan
        May 25, 2010 at 8:49 pm

        Thanks i found it but now the problem is that there are no choice except “any cpu”. just it is there. i mean no x86 or x64 so i can not connect my databes to project -.-

      • ybbest
        May 25, 2010 at 9:33 pm

        You click the Build from your menu and choose configuration manager then you can add the x86 solution platform.

      • Aycan
        May 25, 2010 at 11:41 pm

        Thanks for all comments.. it works now =)

  22. pal
    July 6, 2010 at 2:32 am

    Thanks a lot !! this saved me from crashing down

  23. pal
    July 6, 2010 at 2:34 am

    But I will have my application work on a 64-bit machine. will this change work when I work on a 64-bit machine ? would you also please tell me how to manage if I have to build for a 64–bit machine for proper functioning of other features in program ?

  24. nilam
    August 2, 2010 at 2:38 pm

    hi..

    i’m using c# asp.net .. how do i configure x86 option ?? Please reply.

    Thanks,

  25. nilam
    August 2, 2010 at 2:39 pm

    How do i conigure in c# asp.net, I’m uploading a excel file. and i have this error of “The ‘Microsoft.ACE.OLEDB.12.0′ provider is not registered on the local machine.
    “, everytime i try uploading 2007 file.

    2003 excel file uploads good. but not 2007.

    Please help.

    Thanks,

  26. shahida
    October 10, 2010 at 2:48 pm

    hi..
    i got same prolem..
    after i edit x86..
    it’s not error for The ‘Microsoft.ACE.OLEDB.12.0′ provider is not registered on the local machine.
    and then i got error coukld not find file..
    but i check everything is ok for database..
    what can i do now..

    please help me..

    • ybbest
      October 11, 2010 at 10:09 am

      Try to make sure the path to the file is correct.

  27. shahida
    October 11, 2010 at 3:43 pm

    i have change the location for the file..
    but it’s still have same problem..
    can u give me the solution??

  28. sgl
    December 1, 2010 at 1:15 am

    …the release of the Access 2010 Engine? I noticed it has both 32- and 64-bit versions.

  29. sgl
    December 1, 2010 at 1:16 am

    Any difference with the release of the Access 2010 Engine? I noticed it has both 32- and 64-bit versions.

  30. مصطفي
    December 25, 2010 at 8:25 am

    thanks a alot it was my problem

  31. January 20, 2011 at 1:20 am

    Hi,

    I search the web two days for this problem. All articles suggest me to install a EXE which is for connection string problem.

    I solved my problem with this article. Thank you very much

  32. amit
    April 18, 2011 at 6:48 am

    thanks a lot……..its really work

  33. kwasi
    May 10, 2011 at 1:22 pm

    that was so simple yr the best mate

  34. jonnell catajay
    May 28, 2011 at 8:44 pm

    sir i’m using vb6.0 what can i do with this error i never set a workgroup in my database but during run time it always says that

    (cannot start your application the workgroup information file is missing or open exclusively by another user)

    • ybbest
      May 30, 2011 at 9:13 pm

      Hi Jonnell
      I have never used VB 6.0 before and could not help you.The best place to ask such question are either stackoverflow.com or MSDN Forums.

  35. Shailesh
    July 11, 2011 at 11:21 pm

    Hi
    In windows seven I m trying to get data from an excel on button click event .
    My connection String

    string connString = “Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\source\\SiteCore65\\Individual-Data.xls;Extended Properties=Excel 8.0;”;

    ..And when i am clicked i got error

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

    Please suggest if some 1 have any idea to solve that problem.

    Thanks

    • ybbest
      July 12, 2011 at 12:04 pm

      Hi Shailesh
      Have you tried change the build option as described in the this blog post?

  36. deepali
    July 17, 2011 at 8:03 am

    hello i am getting the same error. I have installed the micrsoft driver also. I am not able to find platform option.. Properties->compile->advance compile but not getting option.
    Tools->option not getting, Build-> not getting.
    My processor is 64 bit, Ms office is 2007,Vb.net framework 2008 3.5 version.
    Since 2 day i am searching on net but no solution.Tried everything..

    • Rune Lorentzen
      August 2, 2011 at 10:23 am

      Not shure about VS 2008, but in VS 2010 the option is located at:
      Project –> Properties –> Compile –> Advanced Compile Options
      In the dialog select x86 in the combo box “Target CPU” to compile for the 32 bit platform.

      For some strange reason (separate dev team for VB and C# …?) the menu selection are located differently and named differently in VB .Net and C#

      Hope this helps!

      Cheers,
      Rune

  37. Rune Lorentzen
    August 2, 2011 at 12:06 am

    Hi,

    I have the same problem, first I thought it was due to Office 2010.
    The application is already set to x86 though due to some other problems, do you know any other issues that can raise this error message?

    Connection string:
    “Provider=Microsoft.ACE.OLEDB.12.0;Data Source=” + file.Path + “;Extended Properties=\’Excel 12.0;HDR=NO;IMEX=1′”

    I’m running Visual Studio 2010, the application is targeting .Net 4.0, and have tested it on a Windows 7 (x64) PC. Works fine on Windows 7 (x86) PC’s.

    Thanks in advance!

    Best regards,
    Rune

    • Rune Lorentzen
      August 11, 2011 at 12:08 am

      Solved it…

      I had installed 64 bit Office, and that ruined it all.
      Installing 32 bit Office solved the problem :-)

      Conclusion:
      – As mentioned in this blog, compile your app in 32 bit mode
      – Be sure to have 32 bit office installed (not 64 bit)

      Now it works like a charm :-)

      Thanks for the nice blog Ybbest!

      Best regards
      Rune

  38. Vero009
    August 9, 2011 at 11:58 pm

    thank`s alott

  39. Michael Kahler
    December 16, 2011 at 4:11 am

    For those using VB with VS 2010, you can find the x86 in the following manner:
    Select the properties as noted previously, then select Compile, Advanced Compile Options and then change the Target CPU to x86.

  40. December 28, 2011 at 3:19 am

    thanks …
    i m suffering from this problem for 5 hr.but ur blog solved it with in a min..

  41. December 31, 2011 at 3:55 pm

    Thanks A lot My Friend I am facing these problem in the another machine.. thanks such a wonderfull article…

  42. January 12, 2012 at 11:48 am

    thank you so much brother… you’ve solve my biggest problem ever

  43. Ravinder
    January 22, 2012 at 6:39 am

    Hi,
    I tried that right click of project ->properties ->

    but there is not build option in this . there is compile, so how can I solve my problem, plz advise me,

    thanks.

    • ybbest
      January 22, 2012 at 12:15 pm

      Try read the comments , there are some tricks for different project types to get the settings.

  44. February 7, 2012 at 1:43 pm

    Dude, you rock!!! Thanks

  45. jawad
    February 11, 2012 at 10:20 am

    i am using win7 & MS office2007 and i have the same error
    what do do ?

    • ybbest
      February 12, 2012 at 1:55 pm

      Have you tried any of the solution specified in the blog post?

  46. unni
    February 22, 2012 at 7:07 pm

    thanks………….

  47. March 1, 2012 at 12:34 am

    Hi,

    i got an error like
    The ‘Microsoft.ACE.OLEDB.12.0′ provider is not registered on the local machine in my website while hosting on my web server.

    I have installed a “AccessDatabaseEngine_x64.exe” on my web server & i have tried to change build setting of my web application.

    But still i have not found any solutions for this error.

    Its working fine in my local machine because i have installed Office 2007 in my pc.

    Can you please guide me for solution of this error.

    Thanks in Advance,
    Hitendra Vadher

    • Amado Sierra
      July 26, 2012 at 1:59 am

      Were you able to find a solution to your issue? I’m experiencing the same here.

      • ybbest
        July 30, 2012 at 2:31 pm

        Have you tried all the solutions in the blog as well as proposed solutions in the comments?

  48. May 14, 2012 at 10:53 pm

    hiii

    Thank u so much it’s working greatly

    Harsha

  49. Tejashree
    September 8, 2012 at 9:00 pm

    thanks a lot…it worked….:)
    superduper happy..!!! thanku…

  50. Vaibhav
    September 24, 2012 at 11:28 pm

    Hi I have office 2007 (32 bit) installed on my 64 bit machine. I tried setting up build type to 32 bit but still facing same issue. pls help. thanks in advance.

  51. rahman
    October 16, 2012 at 11:00 pm

    thanks ..

  52. Timmjamm
    November 20, 2012 at 11:12 pm

    Thanx mate… got this when I was at the end of my tether and it worked like a charm!

  53. CSharp
    December 18, 2012 at 8:57 am

    Thank you very much! Better than MSDN!

  54. Scott
    January 4, 2013 at 8:33 pm

    Just as an echo of all these other folks…thanks for the proper direction on this. I knew that the time had come to lose the old JET 4.0 driver to 2003 .xls files…especially now that WIN 7 deployments were in the offing. This did the trick for the WIN 7 and 2007 .xlsx deployment. All is now right with the world once again:)

  55. Matungo Rene
    January 8, 2013 at 6:37 pm

    Hi friends I need a stored procedure which can help me to Export Data from SqL server 2008 to Ms Access.

  56. Feri
    February 3, 2013 at 6:23 pm

    Hugh :For those that must build 64 bit applications(such as a web part for 64bit sharepoint), Microsoft has provided beta 64bit oledb drivers:http://www.microsoft.com/downLoads/details.aspx?familyid=C06B8369-60DD-4B64-A44B-84B371EDE16D&displaylang=en

  57. Nikola
    February 6, 2013 at 8:39 am

    Thanks, it worked for me!

  58. Renato
    February 20, 2013 at 2:16 am

    Thats work fine, thanks a lot

  59. bu
    April 7, 2013 at 5:43 am

    Really thanks a lot…spend an hour in searching for the solution…you have done a great help….

  60. July 6, 2013 at 12:30 am

    Thanks a lot. The article solved my issue with vs2010 and ms access 2010.

  1. April 18, 2010 at 2:03 pm
  2. October 29, 2011 at 2:20 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 169 other followers

%d bloggers like this: