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
128 active users
2997 visitors today
2924 pages today
(only part of today)
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!

Data source name not found.


MSDN references: Q174655 Q190006 Q159682 Q184572 Q173742 Q172864 Q251254

Very rare - in fact I've only been asked about this one twice. But it was such a difficult one to track down that it had to be documented - see above what a search on MSDN revealed!

The basic issue is that the database provider specified cannot be found. In my code, that's the sDBDriver variable located in include/config.asp, 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;

But as you can see from browsing the MSDN issues, that might be related to a global.asa or permission problem.

As a matter of course with database problems, always 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 microsoft page.

One last caveat. One of my readers had this problem, and it was finally solved in a different way. Here are his words:

"Just to let you know that I managed to fix the problem. I think it had something to do with the permissions on the winnt/temp/ folder - if that makes any sense. I can't recreate the problem even if I remove all the permissions from that folder, but all I know is it is working now after I played with the system environment variables for the TMP and TEMP variable and adjusted the permissions on the temp folder. I think it was a bit of a bug, because it isn't standard behaviour." S.F.

Actually S.F., this is documented, but not as a "Data source not found" issue - see Q251254

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?


See my source code
wherever you see this icon...

You can also download the entire site source code for FREE!