Now that the table is working I want to input the date that it was entered in the table as well. This is the error that appears.
Date:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
/nvillare/guestbook.asp, line 25
How can I input the date into the database from a form and then call it from the database to show on a new page?
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Guest Book</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
'set connection to access the database
set MyConn=Server.CreateObject("ADODB.Connection")
MyConn.Open ("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("\nvillare\db\nidia.mdb"))
mySQL = "SELECT theName, Email, Location, Comments FROM SignIn WHERE Post=yes ORDER BY ID DESC"
set RS = MyConn.Execute(mySQL)
'make a table per entry until it has looped through the entire database
While RS.Eof = false
%>
<table align="center" width="80%" border="1" bordercolor="#00CCCC" cellspacing="0" cellpadding="5">
<tr>
<td><b>Date:</b> <%=RS("theDate").Value%></td>
</tr>
<tr>
<td><b>Name:</b> <%=RS("theName").Value%></td>
</tr>
<tr>
<td><b>E-mail:</b> <a href="mailto:<%=RS("Email").Value%>"><%=RS("Email" ).Value%></a></td>
</tr>
<tr>
<td><b>Location:</b> <%=RS("Location").Value%></td>
</tr>
<tr>
<td><b>Comments:</b> <%=RS("Comments").Value%></td>
</tr>
</table><p><p><p>
<%
RS.MoveNext
count = count + 1
wend
RS.Close
RS = null
MyConn.Close
MyConn = null
%>
<center>Number of Entries = <%=count%></center>
</body>
</html>
Also, how do I get the count to show as 0 if there are no entries in the database?
Thanks for your help!
Nidia