Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting error on .asp web page - error 80004005.

Status
Not open for further replies.

redrook

IS-IT--Management
Dec 18, 2004
6
US
All,

I am managing a web site and a couple of days ago, one of the pages stoped working. It's an .asp page which, I know absolutely NOTHING about. Anyway, after checking out a couple of the posts on this forum I figured out how to get the error, which is as follows:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/links.asp, line 5

This page had been working until a couple of days ago.
Any help would be greatly appreciated,

Thanks,
Steve M
 
A Data Source Name, or DSN, is a system-level pointer to a database (data source). DSNs are created by opening the "Data Sources (ODBC)" control panel, under Administrative Tools.

Something has happened to your DSN. If you look at line 5 of that file, you'll know what the name of the DSN is that it's looking for. Then if you go into the control panel you can see if it seems to be ok, recreating it if necessary (a System DSN, probably, with the name in question, pointing to whatever database the site uses).
 
Actually, that erorr is a level higher and basically means it doesn't understand your connection string. The system is trying to guess whether it is a connection string (DSN-less) or DSN. The absence of the DRIVER attribute in the string makes it think it is a DSN, but when it tries to attach to the DSN it can't find that either.

Either way it is a malformed connection string, though not necessarally a DSN-based connection string. If you paste up your line that has the conection string we may be able to assist further.

-T

barcode_1.gif
 
Hmm, ok. I assumed that since it was working and then suddenly wasn't, that the connection string hadn't changed. I could see the problem either place, but Tarwn's better at this than me, so I'd go with him. :)
 
:p It could very well be a DSN, I was just pointing out that the error could refer to a standard connection string problem as well. In fact, looing at your logic, it probably is a DSN that has had something changed, otherwise it would likely just be a connection failure error. Course, I'm sure the original poster could clarify for us,

-T

barcode_1.gif
 
All,

Thanks for the info...

I inherited this web site, and as someone who knows ABSOLUTLEY NOTHING about ASP, I'm totally lost. All I know is that this was working, then about a week ago, it just stopped and this error started. Here is the actual code...

CODE BEGIN:

<%@LANGUAGE="JAVASCRIPT"%>
<!--#include file="Connections/store_locations.asp" -->
<%
var states = Server.CreateObject("ADODB.Recordset");
states.ActiveConnection = MM_store_locations_STRING;
states.Source = "SELECT * FROM States ORDER BY States ASC";
states.CursorType = 0;
states.CursorLocation = 2;
states.LockType = 3;
states.Open();
var states_numRows = 0;
%>
<%
var Repeat1__numRows = -1;
var Repeat1__index = 0;
states_numRows += Repeat1__numRows;
%>
<% var MM_paramName = ""; %>
<%
// *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

// create the list of parameters which should not be maintained
var MM_removeList = "&index=";
if (MM_paramName != "") MM_removeList += "&" + MM_paramName.toLowerCase() + "=";
var MM_keepURL="",MM_keepForm="",MM_keepBoth="",MM_keepNone="";

// add the URL parameters to the MM_keepURL string
for (var items=new Enumerator(Request.QueryString); !items.atEnd(); items.moveNext()) {
var nextItem = "&" + items.item().toLowerCase() + "=";
if (MM_removeList.indexOf(nextItem) == -1) {
MM_keepURL += "&" + items.item() + "=" + Server.URLencode(Request.QueryString(items.item()));
}
}

// add the Form variables to the MM_keepForm string
for (var items=new Enumerator(Request.Form); !items.atEnd(); items.moveNext()) {
var nextItem = "&" + items.item().toLowerCase() + "=";
if (MM_removeList.indexOf(nextItem) == -1) {
MM_keepForm += "&" + items.item() + "=" + Server.URLencode(Request.Form(items.item()));
}
}

// create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL + MM_keepForm;
if (MM_keepBoth.length > 0) MM_keepBoth = MM_keepBoth.substring(1);
if (MM_keepURL.length > 0) MM_keepURL = MM_keepURL.substring(1);
if (MM_keepForm.length > 0) MM_keepForm = MM_keepForm.substring(1);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<html>
<head>
<meta http-equiv="PICS-Label"
content='(PICS-1.1 " l gen true comment "RSACi North America Server" by "webmaster@kipusa.com" for " on "1997.11.24T10:20-0800" r (n 0 s 0 v 0 l 0))'>
<meta HTTP-EQUIV="distribution" CONTENT="Global">
<meta NAME="keyword"
content="bread, bakery, sour dough, food, pigs, gourmet, sandwiches, wine, cheese, beer, maine, york, ogunquit, boston, flour, king arthurs, raving, wheat, when, fly, brains, portsmouth, rye, oats, cinnamon, recipie, dinner, lunch, breakfast, toast, croutons, salads, restaurants, hungry, starving, portland, new england, crust, cookies, cider, organic, natural, pizza, fresh, artisan, hearth, bake, crackers, apples, cornmeal, kemper, beach, ski, roche brothers, star market, whole foods, bicad, ciscey, hannaford, shaws, demoulas, market basket, new york, onion, dill, olive, honey, potato, garlic, molasses, pumpernickel, anadama, harvest, coconut, granola, cranberries, florida crystals, non fat, rolls, french, foccacia, almonds, walnuts, sunflower, sesame, jewish, delivery, seacoast, hot, wholesale, retail, mail, fedex, ups, crunchy, soft, texture, heart, cholesterol, fiber, sodium, yeast, salt, sponge, slice, parbake, fancy, dessert, appetizer, reubin, pastrami, corned beef, toast, seafood, salmon, chicken, poultry, dairy, delicatesson, subs, hogie, stale, flavor, cheese, montana, minnesota, carbill, hobart, oliver, plastics,cocoa, tomatos, coffee, citrus, tea, café, diner, starbucks,wilberts, natures heartland, globe, best, mayonaise, mustard, yahoo, fennel, pepper, kosher, swine, farmer, silo, charity, kbsystems, kwik lock, rosemary, eggs, salt, pesto, italian, spaghetti, monte cristo, toaster, ham, turkey, stuffing, thanksgiving, christmas, party, champagne, caviar, basket, italy, stonewall, ll bean, kennebunk, acadia, vermont, all 50 states, cuisinart, william sonoma, jalapeno, sponge, ferment, water, hog, heaven, buckwheat, pumpkin seed">
<meta NAME="description"
content="We bake old-world style artisan breads using the finest organic, natural ingredients. Experience what over 1 million people in New England have enjoyed for years.">
<meta NAME="robots" content="index, follow">
<meta NAME="ratings" content="General">
<meta NAME="resource-type" CONTENT="Document">
<title>Where to find our Breads</title>
</head>
<body bgcolor="#008080">
<div align="center">
<center>
<table border="0" cellpadding="3" width="651" bgcolor="#FFFFFF"
style="border: 2 ridge rgb(0,0,0)" background="images/back.gif">
<tr>
<td width="100%">
<div align="center">
<center>
<table border="0" cellpadding="3"
width="100%">
<tr>
<td width="50%" valign="top" align="left"><img src="images/title.gif"
alt="title.jpg (13826 bytes)" WIDTH="369" HEIGHT="37">
<div align="center">
<center>
<table
border="0" cellpadding="3" width="100%">
<tr>
<td width="100%"></td>
</tr>
<tr>
<td width="100%">
<form>
<div align="center">
<center>
<p>&nbsp;
<select name="list" size="1">
<option value="main.htm">About Us</option>
<option value="breads.htm">Our Breads</option>
<option value="history.htm">Our History</option>
<option value="shop.htm">Buy our bread</option>
<option value="store.htm">Shop our store</option>
<option value="contact.htm">Contact Us</option>
<option value="links.asp">Where to find
our Breads</option>
</select>
<input TYPE="button" VALUE="Go"
onClick="parent.location.href=this.form.list.options[this.form.list.selectedIndex].value">
</p>
</center>
</div>
</form>
</td>
</tr>
</table>
</center>
</div>
</td>
<td width="50%"><img src="images/all_natural.gif" alt="all_natural.jpg (8242 bytes)"
WIDTH="250" HEIGHT="98"></td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="3" width="100%">
<tr>
<td width="50%" valign="top" align="left">If you would like
to know where you can go to buy some of our breads from a
local store, please choose the state in which you live and
we will let you know where we are.</td>
<td width="50%" style="border-left: 3px groove rgb(0,128,128)" valign="top" align="left">
<table width="75%" border="0" cellspacing="0" cellpadding="3">
<% while ((Repeat1__numRows-- != 0) && (!states.EOF)) { %>
<tr>
<td><b><A HREF="detail.asp?<%= MM_keepURL + ((MM_keepURL!="")?"&":"") + "States=" + states.Fields.Item("States").Value %>"><%=(states.Fields.Item("States").Value)%></A></b></td>
</tr>
<%Repeat1__index++; states.MoveNext();}%>
</table>
</td>
</tr>
</table>
<a href="main.htm"><br>
About Us</a> | <a href="breads.htm">Our Breads</a> | <a href="history.htm">Our
History</a> | <a href="shop.htm">Buy our Bread</a><br>
<a href="links.asp">Where to find our Breads</a> | <a href="store.htm">Shop
our Store</a> | <a href="contact.htm">Contact Us</a><br>
<br>
Copyright © When Pigs Fly 1999 - 2004<br>
This site produced by: <a href=" target="_blank">911
PC Rescue</a>
</center>
</div>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
<%
states.Close();
%>
 
Open this file: Connections/store_locations.asp

Somewhere in it will be this variable: MM_store_locations_STRING

Find out the value of that and then follow the directions I gave above regarding the DSN. What did you discover?
 
Genimuse

I really appreciate the help...thanks alot!

Ok, I found the file: Connections/store_locations.asp
It reads as follows:
%
// FileName="Connection_odbc_conn_dsn.htm"
// Type="ADO"
// HTTP="false"
// Catalog=""
// Schema=""
var MM_store_locations_STRING = "dsn=SendBread_locations;"
%>

I'm still not getting this however...

Should line 5 be changed from:
states.ActiveConnection = MM_store_locations_STRING;
to
states.ActiveConnection = dsn=SendBread_locations????

The other thing I don't understand....
If this is an ODBC setting in Control Panel, why is the page failing for every site visitor??
I can't imagine this needs to be included in everyone's ODBC setting, unless this is something the Web Hosting company is responsible for...is that it???

I'm lost...

SteveM




 
It's an ODBC setting on the SERVER, not the local computer.

So, now, on the server, you need to see if you have a DSN called "SendBread_Locations". Use the instructions I have above for looking at the DSN. Remember, this has to be on the SERVER machine. It would fail for everyone if this DSN is broken because they're all getting their data from the server.
 
Oops, missed that you're using a hosting company.

OK, now you need to contact the hosting company and say "Hey, my DSN called SendBread_locations" isn't working any more. What gives?
 
Hi

Have you thought about using a DSN'less connection?

Thanks

Glen
Conception | Execution
 
Genimuse

Thanks very much!
I'll give the hosting company a call in the morning. It's actually happening to a couple of the other ASP pages as well.
Now that I know what's going on, I can get it fixed.

Again, thanks very much!
SteveM
 
newmediaguy

Actually, the owners have requested doing away with this group of ASP pages.
The pages just list where their product is sold...the store names and addresses.
What they would like to replace it with is something where the visitor would enter his/her zip code, and the closest 3 or 4 stores would be displayed.
Naturally, I have absolutely NO IDEA how to go about creating this.
Creating HTML pages with Dreamweaver is just about as far as I can go with any type of success!!!

SteveM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top