" 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 " " Response.write " " Response.write " " Response.write " " Response.write " " Response.write " " 'move to the next record strRec.MoveNext 'loop back around Loop end if 'reset server variables set strRec = Nothing %>
<% 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
" & strName & "
  " & strDate & " - " & strTime & "
" & strComment & "
 

Check back here often for store events, new arrivals, and the latest trends!

 
Visit our gallery.
817.428.7088

Join our mailing list

Name
E-mail

 

 
 
 
Copyright © 2008 J.H. Interiors. All rights reserved.