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.
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 Properties
Then click on Build and change the Platform target from Any CPU to x86.Recompile your program , it works like charm.
*************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://openxmldeveloper.org/attachment/1970.ashx
*************Update on 5 March 2011*****************
*************Update on 29 OCT 2011*****************
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 ?
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
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?
This helped for me, thanks alot
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.
I am using visual studio 2008 , are you using the same version?
Sir i dont have that Build option..
Thanks ya thank you so much….We really struggled lot for this option. but your this above
suggestion helped us well
Saved my life! Thank you!!!
Thanks Dude! you are the best.
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!
Yeah! I managed to solve this problem. Thanks alot!!
Thanks dude,
saved a lot of trouble
Thanks! Work like a charm! Has been looking for a solution on this a long time! Once again, Thanks!
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?
thanks a lot for that solution
hii dear,
thanks alott u.i was also too suffering from this problem and your disscussion helped me..
thnks again
sidharth
Hello.
How can i coonect ms access database with my c# program?
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!
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!
hello
thanks for the explication… but in the properties of my project i dont see the plantaform…
you can help me?
thanks
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
Thanks for this information.
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
thank you very much. i installed it and it work for me.
best regards.
Many many thanks
Without changing the Build options you can connect XLSX files using Open Office XML …
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.
Good luck!
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.
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
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
In vb,you can right click then click properties then Compile from your left-pane.You can modify your platform there.
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 -.-
You click the Build from your menu and choose configuration manager then you can add the x86 solution platform.
Thanks for all comments.. it works now =)
Thanks a lot !! this saved me from crashing down
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 ?
hi..
i’m using c# asp.net .. how do i configure x86 option ?? Please reply.
Thanks,
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,
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..
Try to make sure the path to the file is correct.
i have change the location for the file..
but it’s still have same problem..
can u give me the solution??
…the release of the Access 2010 Engine? I noticed it has both 32- and 64-bit versions.
Any difference with the release of the Access 2010 Engine? I noticed it has both 32- and 64-bit versions.
thanks a alot it was my problem
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
thanks a lot……..its really work
that was so simple yr the best mate
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)
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.
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
Hi Shailesh
Have you tried change the build option as described in the this blog post?
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..
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
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
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
thank`s alott
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.
thanks …
i m suffering from this problem for 5 hr.but ur blog solved it with in a min..
Thanks A lot My Friend I am facing these problem in the another machine.. thanks such a wonderfull article…
thank you so much brother… you’ve solve my biggest problem ever
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.
Try read the comments , there are some tricks for different project types to get the settings.
Dude, you rock!!! Thanks
i am using win7 & MS office2007 and i have the same error
what do do ?
Have you tried any of the solution specified in the blog post?
thanks………….
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
Were you able to find a solution to your issue? I’m experiencing the same here.
Have you tried all the solutions in the blog as well as proposed solutions in the comments?
hiii
Thank u so much it’s working greatly
Harsha
thanks a lot…it worked….:)
superduper happy..!!! thanku…
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.
thanks ..
Thanx mate… got this when I was at the end of my tether and it worked like a charm!
Thank you very much! Better than MSDN!
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:)
Hi friends I need a stored procedure which can help me to Export Data from SqL server 2008 to Ms Access.
Thanks, it worked for me!
Thats work fine, thanks a lot
Really thanks a lot…spend an hour in searching for the solution…you have done a great help….
Thanks a lot. The article solved my issue with vs2010 and ms access 2010.
Thank you. Been searching for a resolution for about a week.