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
82 active users
1681 visitors today
928 pages today
(only part of today)
Tools I use

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

RSS submissions

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

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

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...

Qualify for Free Trade Magazines

Free subscriptions to industry leading publications for those who qualify!