Case of the ADODB.Connection Provider Not Found Error

A customer’s old in-house app was bombing out occasionally on Windows 7 with the following error:

ADODB.Connection: Provider cannot be found. It may not be properly installed.

image

The question was – what provider could not be found? We did not have access to the source code to check what line no. 38 referred. From ProcMon it wasn’t immediately obvious what was missing. We could use a debugger and stack traces to work this out…or…

To find the connection string used we simply used API Monitor (http://www.rohitab.com/apimonitor)

(It is also possible some Windows logging that would tell us, but if there was I couldn’t think of it at the time…)

We monitored String Manipulation library of the C runtime

image

and Dialog Boxes

image

By monitoring dialog boxes we can search the log for text in a message box, and then reverse our way through the log to find point before error occurred.

We then selected the running process from a list, right clicked and selected option to monitor process.

We then reproduced problem, and searched for Provider. Immediately I found the database connection string in it’s entirety:

image

I tested the SQL server, user ID and password. All was OK. SQL Server Express 2008 was installed – as was SQL Native Client.

But here’s the problem: The provider being asked for was SQLNCLI. The installed SQL Native Client was SQL Native Client 10.0 (SQL 2008) not SQL Native Client (SQL 2005)

Downloading the standalone SQL Native Client from Microsoft (http://download.microsoft.com/download/2/7/c/27c60d49-6dbe-423e-9a9e-1c873f269484/sqlncli.msi) immediately removed the error and the application continued to work happily along. In odbcad32.exe we also saw SQL Native Client appear as an option…

image

About chentiangemalc

specializes in end-user computing technologies. disclaimer 1) use at your own risk. test any solution in your environment. if you do not understand the impact/consequences of what you're doing please stop, and ask advice from somebody who does. 2) views are my own at the time of posting and do not necessarily represent my current view or the view of my employer and family members/relatives. 3) over the years Microsoft/Citrix/VMWare have given me a few free shirts, pens, paper notebooks/etc. despite these gifts i will try to remain unbiased.
This entry was posted in API Monitor, Application Compatibility, Troubleshooting and tagged . Bookmark the permalink.

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