Wife/Girlfriend/Sister?
Pepper Spray &
Stun Gun Specials!
KEEP THEM SAFE.
 CoverYourASP --> Troubleshooting --> Database connection errors

Free membership

Join in the fun! Sign in
Member Services

Site navigation
Download the entire site!
Search my articles
Free Magazines
Browse the directory

Send me feedback
Buy my boxer shorts

Recommend this page
Printer-friendly page

Resources I recommend
Link to my site
Advertising slashed!
About your privacy
Legal stuff
Site statistics
16 active users
1063 visitors today
1117 pages today
(only part of today)
Tools I use

CoverYourASP
Copyright © 1999-2012 James Shaw.
All rights reserved.

ASP.NET Blog
RSS submissions
E-commerce

Now open source with SourceForge!

Provider cannot be found.


MSDN references: Q191271

This is by far the most common error that users get when attempting to connect with my database.

Step 1 (optional). I recommend that you download the latest versions of the free Microsoft Data Access Components from http://www.microsoft.com/data/download.htm.

Windows 95 users - please note that you must install DCOM first, as described on the above page.

Step 2. Experiment with different settings in the CYA configuration file, include/config.asp. This file contains a section that defines the database connection.

The relevant parameter is sDBDriver, as shown below:

// ============================================
// database configuration
// ============================================

// OLE DB Provider constants
var sAccess9x = 'Microsoft.Jet.OLEDB.2.5';
var sAccess97 = 'Microsoft.Jet.OLEDB.3.51';
var sAccess2000 = 'Microsoft.Jet.OLEDB.4.0';
var sSQLServer = 'SQLOLEDB.1';

// which am I using?
var sDBDriver = sAccess97;

Try setting sDBDriver to any of the other constants, and try again. If you've installed the latest MDAC, you'll be able to use the sAccess2000 setting.

Step 3. To find out the exact setting required in config.asp, there is one more possibility, but it involves searching in the registry.

Note that making any changes to settings in the registry can make your computer unusuable, perhaps permanently.

Run the Registry Editor by opening the Start menu and selecting "Run...". Type regedit.exe into the dialog box and click on OK.

Next, open the Edit menu and choose "Find...". The dialog below will appear:

Type in the search phrase shown above, then click the "Find Next" button. When you see a screen like that below, make note of the number at the end of the description. Set the sDBDriver variable in include/config.asp to that description.

Featured sponsor
My favorite resources

Tiki Statues - Tiki Masks - Tiki Totems



Qualify for Free Trade Magazines

Free subscriptions to industry leading publications for those who qualify!


I share my content

Supporting ASPRSS

Do you need a quick and easy way to link to my articles? All the information you need is published with ASPRSS...


New Proposal Kit Professional 5.1
Brand yourself as a top professional: create quotes and amazing proposals and get many legal documents free!

The latter saved me 3 times the purchase price on the first day I owned it!