Installing Microsoft Office Data Connectivity Components

Pretend for a second that you are an application developer, developing in VB.Net, and you find yourself needing to work with an Office-based data file (like Access or Excel). So, you write your code, put together your connection string, and go to run your program. Maybe the program works on your workstation, maybe it doesn’t. The real problem is that the code bombs out when you run it on your web server. You get an error that looks like this:

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

Now what? Well, the error should be pretty clear to anyone working with OLEDB or ODBC connections. Whenever you go to make a connection to a database, using a database API to do so, you need to have the appropriate drivers installed. If you have the latest version of Office (2007+) installed, then you may already have the necessary drivers. If you don’t (and you really shouldn’t on a server), then you’ll need to separately install the drivers. They can be a bit hard to track down, but here is what I’ve found.

Continue reading