ASP/.NET Web Hosting
* 3 Months FREE *
CLICK HERE!
 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
318 active users
1829 visitors today
2753 pages today
how is this done?
ASP.NET Showcase
ASP.NET Graph and Chart Component with FREE developer version

ASP.NET Shopping Cart and E-commerce Control with FREE trial download

ASP.NET Web Hosting with free month and setup

$15 Domain Name Registration from .DNR.
As seen on these sites
Special thanks go to the sites that support me by publishing my articles.
See more

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

ASP.NET Blog
ASPRSS
ShawThing

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

Selling products online - read how James does it now


CoverYourASP Mugs, T-shirts, caps - even Boxer shorts...
I don't make a penny from these, but they're a lot of fun! Don't you need a new mouse mat?


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!