| |

|
<%
Dim adoCon, strName, strComment, strTimestamp, strDate, strTime
Set adoCon = Server.CreateObject("ADODB.Connection")
strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=c:\Database\guestbook.mdb"
'create recordset object
set strRec = Server.CreateObject("ADODB.Recordset")
strSql = "select * from comments ORDER BY timestamp DESC"
'query the database
strRec.Open strSql, strCon
'if there are no records in the database display a message
if strRec.EOF then
Response.write " | | There are no records in the database | "
else
'else we display the guestbook
do while not strRec.EOF
'we read the records from the database
strName = strRec("name")
strComment = strRec("comment")
strTimestamp = CDate(strRec("timestamp"))
'we format the date and time to be displayed
strDate = FormatDateTime(strTimestamp, VBShortDate)
strTime = FormatDateTime(strTimestamp, VBShortTime)
'we add the html code
Response.write " | "
Response.write " " & strName & " | "
Response.write " | "
Response.write " " & strDate & " - " & strTime & " | "
Response.write " | "
Response.write " " & strComment & " | "
Response.write " | | "
'move to the next record
strRec.MoveNext
'loop back around
Loop
end if
'reset server variables
set strRec = Nothing
%>
Check back here often for store events, new arrivals, and the latest trends!
|
|
|
| 817.428.7088 |
Join our mailing list
|
|
|