<% Option Explicit %> <%On Error Resume Next %> <%Dim bydetail,time,i,messcount,PageNo,TotalRecs, TotalPages Dim x %> <% 'Dim DSN_NAME,Connect,OnDB,Query ' DSN_NAME = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("../../fpdb/awamessdb.mdb") & ";" ' ' Set Connect = Server.CreateObject("ADODB.Connection") ' Connect.ConnectionTimeout = 15 ' Connect.CommandTimeout = 30 ' Connect.Open DSN_NAME ' Set OnDB = Server.CreateObject("ADODB.Recordset") %> <% 'Set Connect = Server.Createobject("ADODB.Connection") 'Connect.Open "messdb" 'Set OnDB = Server.CreateObject("ADODB.Recordset") Query = ("SELECT * FROM emaillist") Query = Query & " ORDER BY submitdate DESC" OnDB.Open Query,Connect,3,3 messcount= OnDB.recordcount OnDB.PageSize = 10 TotalPages = CInt(OnDB.PageCount) %> AWA Message Board <% If request.form("Page")="" then PageNo=1 Else PageNo=request.form("Page") End If OnDB.absolutepage=PageNo %>

    AWA Bulletin Board

Post a new message   Back to the Main Page
There are <%= messcount%> messages. This is page <%=PageNo%> of <%=TotalPages%>.
<% i=0 x = 0 ' let's display the 10 records on the page For x = 1 to 10 If OnDB.eof then Exit For Else %>
Subject:  <%=OnDB("subject")%>
Message: <%=OnDB("message")%>
From:  "><%=OnDB("email")%>
Submitted:    <% =OnDB("submitdate") %>

<% OnDB.MoveNext End If Next ' now let's set up the navigation... response.write "" response.write "
" ' we don't want "Previous" on the first page so we'll do this If PageNo > 1 then response.write "
" response.write "" response.write "" response.write "" Else response.write " " End If response.write "
" ' we don't want "Next" on the last page so we'll do this If NOT OnDB.eof then response.write "
" response.write "" response.write "" response.write "" Else response.write " " End If response.write "
" OnDB.Close Connect.Close Set OnDB = nothing Set Connect = nothing %>