%@ Language="VBScript" %> <% Option Explicit %>
| The Guest Book: | |||||
| Latest: | <% 'declare your variables Dim connection, recordset Dim sSQL, sConnString 'declare SQL statement that will query the database sSQL="SELECT * FROM Users_tbl ORDER BY id DESC" 'create an ADO connection and recordset object Set connection = Server.CreateObject("ADODB.connection") Set recordset = Server.CreateObject("ADODB.Recordset") 'define the connection string, specify database 'driver and the location of database sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & Server.MapPath("/admin/guestbook/users.mdb") 'Open the connection to the database Connection.Open sConnString 'Open the recordset object, executing the SQL Recordset.Open sSQL, Connection Response.Write " " & recordset("name") %> | ||||
| <% Response.Write "" & recordset("thedate")%> | <% Response.Write " " & recordset("overview")%> | ||||
| Click here to view the full guest book or click here to sign with your comments | |||||