Ok well a friend of mine is working on making a site and he's doing it in ASP. Now, I'm not really fluent in web design so I'm kinda stuck as much as he is. Maybe someone here can provide some help. It's apparently not recognizing the database for some reason which we can't figure out. Here is the code for the portion of the site that isn't working:
<%@ Language="JavaScript" %>
<!-- #include file="adojavas.inc" -->
<html>
<head></head>
<body>
<br>
<hr width=700>
<center><h1> Online Catalog</h1></center>
<hr width=700>
<br>
<br/>
<%
var strConn="dsn=project2;uid=wchaudry;pwd=75006363;";
var dbConnection= Server.CreateObject("ADODB.Connection");
var objrecord = Server.CreateObject("ADODB.Recordset");
dbConnection.Open(strConn);
if(dbConnection.State == "adStateClosed")
Response.Write(" Sorry, could not connect to the database");
else
{
Response.Write("<table border=1 align=center> <tr><td>Author</td> <td>Title</td> <td>Publisher</td><td>In Stock</td> <td>Price</td></tr>");
objrecord.Open("Books", dbConnection, adOpenForwardOnly, adLockReadOnly, adCmdTable);
while(!objrecord.EOF)
{
var tauthor= objrecord("AuthorLastName") + "," + objrecord("AuthorFirstName")
var ttitle = objrecord("Title");
var tisbn = objrecord("ISBN");
var tpublisher = objrecord("Publisher");
var tprice = objrecord("Cost");
var tinstock = objrecord("InStock");
Response.Write("<tr> <td>" + tauthor+ " </td> <td> <a href= 'bookdetails.asp?id="+tisbn+ "'>" + ttitle + "</a></td> <td>" + tpublisher + "</td> <td>" + tinstock + "</td><td>" + tprice + "</td></tr>");
objrecord.MoveNext();
}
}
%>
</body>
</html>
Copying and pasting it made it a lil messy there... sorry about that... if you need the rest of the code just let me know and I'll post it. Any help would be greatly appreciated. Thanks.
<%@ Language="JavaScript" %>
<!-- #include file="adojavas.inc" -->
<html>
<head></head>
<body>
<br>
<hr width=700>
<center><h1> Online Catalog</h1></center>
<hr width=700>
<br>
<br/>
<%
var strConn="dsn=project2;uid=wchaudry;pwd=75006363;";
var dbConnection= Server.CreateObject("ADODB.Connection");
var objrecord = Server.CreateObject("ADODB.Recordset");
dbConnection.Open(strConn);
if(dbConnection.State == "adStateClosed")
Response.Write(" Sorry, could not connect to the database");
else
{
Response.Write("<table border=1 align=center> <tr><td>Author</td> <td>Title</td> <td>Publisher</td><td>In Stock</td> <td>Price</td></tr>");
objrecord.Open("Books", dbConnection, adOpenForwardOnly, adLockReadOnly, adCmdTable);
while(!objrecord.EOF)
{
var tauthor= objrecord("AuthorLastName") + "," + objrecord("AuthorFirstName")
var ttitle = objrecord("Title");
var tisbn = objrecord("ISBN");
var tpublisher = objrecord("Publisher");
var tprice = objrecord("Cost");
var tinstock = objrecord("InStock");
Response.Write("<tr> <td>" + tauthor+ " </td> <td> <a href= 'bookdetails.asp?id="+tisbn+ "'>" + ttitle + "</a></td> <td>" + tpublisher + "</td> <td>" + tinstock + "</td><td>" + tprice + "</td></tr>");
objrecord.MoveNext();
}
}
%>
</body>
</html>
Copying and pasting it made it a lil messy there... sorry about that... if you need the rest of the code just let me know and I'll post it. Any help would be greatly appreciated. Thanks.