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.
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
and Dialog Boxes
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:
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…