Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Web Programming > Other Programming - Perl, C++, Java, ASP, .NET Development
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 06-07-2006, 04:27 PM   #1 (permalink)
barreledaction
Junior Member
 
Join Date: May 2006
Posts: 6
Default new to ASP - need help

***YOUR MESSAGE HAS BEEN EDITED PLEASE USE CORRECT TAGS WHEN POSTING CODE***
I get this message:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/displaystock.asp, line 32
-----------------------------------------------------------------------
below is my code. Would someone please tell me what is wrong? - and how to correct
[html]
<%@ language = javascript%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>look up data in inventory</title>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR>
</HEAD>
<BODY>
<center>
<font size="+1"><b><br><br>Inventory Search/Maintenance</b></font><p>
<table border=1>
<thead>
<tr>
<th>Id#</th>
<th>Make</th>
<th>Model</th>
<th>Series</th>
<th>Description</th>
<th>Color</th>
<th>Qty</th>
<th>Cost</th>
<th>Price</th>
<th></th>
</tr>
</thead>
<%
// open connection to database, then populate a recordset with list of stock
var adoConnection = Server.CreateObject("ADODB.Connection");
var adoRecordSet;
var mySQL;
adoConnection.Open("DSN=inventorydb");
var mySQL = "select stockId, make, model, description, series, color, qty, cost, price" + "from stock";
adoRecordSet = adoConnection.Execute(mySQL);
// loop through recordset and write stock details out to page
while ( adoRecordSet.Eof == false )
{
%>
<tr>
<td><%=adoRecordSet("stockId").Value%></td>
<td><%=adoRecordSet("make").Value%></td>
<td><%=adoRecordSet("model").Value%></td>
<td><%=adoRecordSet("description").Value%></td>
<td><%=adoRecordSet("series").Value%></td>
<td><%=adoRecordSet("color").Value%></td>
<td><%=adoRecordSet("qty").Value%></td>
<td><%=adoRecordSet("cost").Value%></td>
<td><%=adoRecordSet("price").Value%></td>
<td><a href="neworders.asp?stockId=<%=adoRecordSet("stock Id").Value%>">
Use this</a></td>
</tr>
<%
adoRecordSet.MoveNext();
}

// close recordset and connections
// and release memory used by recordset and connections objects
adoRecordSet.Close();
adoRecordSet = null;
adoConnection.Close();
adoConnection = null;
%>
</table>
</center>
</body>
</html>
[/html]
barreledaction is offline   Reply With Quote
Sponsored Links
Old 08-28-2006, 07:02 PM   #2 (permalink)
wileynet
Junior Member
 
Join Date: Aug 2006
Posts: 5
Default Re: new to ASP - need help

"Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/displaystock.asp, line 32 "

I think that says it all. I would assume you don't have an ODBC data source configured for the name your calling in your code...
__________________
wileynet inc
wileynet is offline   Reply With Quote
Old 08-28-2006, 07:05 PM   #3 (permalink)
wileynet
Junior Member
 
Join Date: Aug 2006
Posts: 5
Default Re: new to ASP - need help

"inventorydb"
__________________
wileynet inc
wileynet is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 10:13 AM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums