• t
  • g
  • B
  • Z
  • @
  • e

portfolio & blog of senior web developer, Fahd Murtaza



  • About
  • Portfolio
  • WordPress
  • CV
  • Blog
  • Contact

  • About
  • Portfolio
  • WordPress
  • CV
  • Blog
  • Contact

Solution for Windows Vista Ultimate 64 bit issue: The ‘Microsoft.Jet.OLEDB.4.0′ provider is not registered on the local machine

March 18th, 2009 by Fahd

Background:

I am comitted to resolve any programming issues that arise on my Windows Vista Ultimate installed on my HP Artist Edition Laptop DV2899ee. As Vista being the most criticized operating system for development purposes. I do have plans for getting Mac and switching back to Windows XP on my Windows machines but right now I like the Windows Vista experience and it works for me.

My friend Tahir Bashir (a great coder), who works for me under the umbrella of Universal Coders, is working again on the software that we did for AlHadeed Corporation back in 2006. It was not being used by these guys due to less adoption and computer literate manpower but they again are improving the work and so, we are re-developing the software in accordance with the new needs of Mr. Haider the CEO of AlHadeed Corporation Mansehra. He also happens to be the husband of my cousin so I am really taking personal interest in development of this software.

The Problem:

The problem I faced last night, when Tahir sent me the software was that I was unable to run it on my Visual Studio 2008 on Windows Vista Ultimate 64 bit. I was having a problem that is shown in the following screen shot.

Database connection string for Access which produces the error

Visual Studio 2008 Exception Dialog whoing the error

The excpetion window says,  “Microsoft.Jet.OLEDB.4.0′ provider is not registered on the local machine”. My OS is Vista x64 and Visual Studio 9. But this error does not occur on Tahir’s Win XP Pro machine.This happens while using the debug button.

Exception details

System.InvalidOperationException was unhandled
Message=”The ‘Microsoft.Jet.OLEDB.4.0′ provider is not registered on the local machine.”
Source=”System.Data”
StackTrace:
at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper)
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at AlHadeed.MainForm.SelectBasicItems(Int32 mode, Int32 target, Int32 index1, Int32 index2) in C:\Users\Fahd Murtaza\AlHadeed\AlHadeed\Form1.cs:line 289
at AlHadeed.MainForm.ItemPanel_VisibleChanged(Object sender, EventArgs e) in C:\Users\Fahd Murtaza\AlHadeed\AlHadeed\Form1.cs:line 103
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at AlHadeed.MainForm.SalesBtn_Click(Object sender, EventArgs e) in C:\Users\Fahd Murtaza\AlHadeed\AlHadeed\Form1.cs:line 40
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at AlHadeed.Program.Main() in C:\Users\Fahd Murtaza\AlHadeed\AlHadeed\Program.cs:line 19
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

Solution

Anyhow the reason for this problem is simple. Visual Studio itself is a 32 bit application so it can use 32 bit components. But my Visual Studio 2008 settings were for 64 bit application. Its OK with other Database Strings but not for MS Access as there is no 64bit version of Jet. Using a 64bit data provider (which doesn’t exist I believe, correct me if I am wrong), or spin off your database work to a 32 bit process. So I changed the settings for my application this way. Its shown in the screenshot below.

If you are experiencing the same issues, right click your project and choose the “Properties”, then select the “Build” page. Find the “Platform target” selection ComboBox. Please change the default “Any CPU” into “x86” then build your application again.

Solution to the problem: Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

Solution to the problem: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

Voila! Solves the issue perfectly. No more bloody exceptions!

Posted in General

6 Comments

  1. Offertuth
    Posted May 5, 2009 at 7:51 pm | Permalink

    ehh.. funny ))

  2. JAY
    Posted May 6, 2009 at 2:42 pm | Permalink

    I installed a Domino Exam Simulation Software on my laptop which runs on vista 64 bits and this issue resolved above comes on after i try to run the application after installation.

    What do i do to resolve this?

  3. Riccardo
    Posted May 9, 2009 at 11:12 pm | Permalink

    Is a solution if your application is write in asp.net… if you MUST write your application in asp classic the solution i think it’s not the same… In this moment i don’t look the solution… and u ? R.

  4. Kiran
    Posted October 1, 2010 at 9:00 pm | Permalink

    Hi,

    I have the same problem i.e “The ‘Microsoft .Jet.OLEDB.4.0′ provider is not registered on the local machine.” error when I am running my code. I am using Window Vista Home Premium Service Pack2. I went to Build by right from the property of the project but couldn’t find for “Platform target” selection ComboBox. I need this for web application and trying in web application. Does your solution works for desktop application or both Desktop and Web applications.

    Please Help
    Kiran

  5. Fahd
    Posted October 3, 2010 at 12:44 am | Permalink

    Hi Kiran

    My solution worked for Desktop application and I am sure it should work for your web application too.

    But I think here is your exact solution

    http://stackoverflow.com/questions/1883124/how-to-set-platform-target-for-a-asp-net-web-site-project

  6. Fahd
    Posted October 3, 2010 at 12:46 am | Permalink

    @Kiran: For you and others looking for solution to same problem specifically for ASP.NET applications i.e web applications on .NET platform either C# or VB.NET, use following instructions.

    There appears to be no x86/x64 target for web site projects, only the Any CPU target. You therefore have to control the bitness of your website by controlling the bitness of your app pool.

    On Windows Server 2008 or Windows 7, if you want to make an AppPool 32-bit, go into the IIS Manager > [Server Name] > Application Pools > Advanced Settings. Set “Enable 32-Bit Applications” to “True” for the app pool you want to run as an x86 process.

    Note that you will have to take other WOW64 considerations into account, for example, registry settings accessed by your web app will now use the [HKLM\Software\Wow6432Node] key instead of the [HKLM\Software] key.

    Courtesy of: http://stackoverflow.com/users/110776/nekno
    URL: http://stackoverflow.com/questions/1883124/how-to-set-platform-target-for-a-asp-net-web-site-project

One Trackback

  1. By خطأ عند برمجة تطبيقات قواعد بيانات أكسس على وندوز64بت | small DiGiTaL world on February 6, 2011 at 6:02 pm

    [...] Solution for Windows Vista Ultimate 64 bit issue: The ‘Microsoft.Jet.OLEDB.4.0′ provider is not … Share [...]

Post a Comment

Click here to cancel reply.

Your email is never published nor shared. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Categories


Want to Hire Me?


Fahd Murtaza is the guy behind fahdmurtaza.com: your source for getting your web development projects done. Fahd sepcialises in Open Source Web Development and his favorite is WordPress. This site is a platform to his web development portfolio and blog all on a newly designed responsive website—try viewing it on your mobile.

If after viewing Fahd's portfolio, you think he might be just the guy to hire for your web / application development; check out the web development pricing page, then find out how to hire Fahd with a web development project idea and a brief of requirements.

 


Fahd Murtaza has put together a number of Web Development Articles that will help you see what he does, how he does it. You will also be able to see the level of work, and passion, that Fahad puts into each and every job. Understanding a little about the process can make the idea of investing good money much more palatable. People have always appreciated my Agile techniques. Its time you

Fahd Murtaza, Web Developer, Programmer, Wordpress Expert
U
This is portfolio & blog of senior web developer Fahd Murtaza, who has 9 years experience in: website development, WordPress, drupal, CMS and CRM application development with passion of making web better; one site at a time.


@
Mobile +968 93 678 199
email info@fahdmurtaza.com
Google Talk: fahdim@gmail.com
Skype fahd.murtaza
Location Muscat, Oman.


_
Developed using my beloved, love of my life, WordPress, built on the responsive, grid based, mobile optimised, Foundation Framework, and a modified Foundation theme. More Info →


Follow Fahd: Twitter / Google+ / Instagram / Facebook / Dribbble / Tumblr / Posterous/ flickr /
Copyright © 2006-2012 Fahd Murtaza

    • WordPress.org
    • Documentation
    • Support Forums
    • Feedback