View Full Version : new to ASP - help

07 Jun 2006, 01:04 PM
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

<%@ language = javascript%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<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>
<font size="+1"><b><br><br>Inventory Search/Maintenance</b></font><p>
<table border=1>
// open connection to database, then populate a recordset with list of stock
var adoConnection = Server.CreateObject("ADODB.Connection");
var adoRecordSet;
var mySQL;
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 )
<td><a href="neworders.asp?stockId=<%=adoRecordSet("stockId").Value%>">
Use this</a></td>

// close recordset and connections
// and release memory used by recordset and connections objects
adoRecordSet = null;
adoConnection = null;

08 Jun 2006, 07:20 AM
check the DSN exists and is setup correctly and if you are sure that is corect get back to me.

Personally I avoid DSN and use connection strings as they are fster and lower maintenance....
http://www.connectionstrings.com/ is a good place to start.