%@ Language=VBScript %>
<%
On Error Resume Next
dim connectme
connectme="DSN=austi5.austinspca;uid=" & strUserName & ";pwd=" & strPassword & ";database=austi5"
'Set how many records per page we want
Const NumPerPage = 3
'Retrieve what page we're currently on
Dim CurPage
if (Request.QueryString("CurPage")) = "" then
CurPage = 1 'We're on the first page
Else
CurPage = Request.QueryString("CurPage")
End If
'Explicitly Create a recordset object
Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
'Set the cursor location property
rs.CursorLocation = adUseClient
'Set the cache size = to the # of records/page
rs.CacheSize = NumPerPage
'Open our recordset
Dim strSQL
strSQL = "SELECT * FROM Events " &_
"WHERE StartDate >= '" & Now() & "' "&_
"ORDER BY StartDate ASC"
rs.Open strSQL, connectme
rs.MoveFirst
rs.PageSize = NumPerPage
'Get the max number of pages
Dim TotalPages
TotalPages = rs.PageCount
'Set the absolute page
rs.AbsolutePage = CurPage
'Counting variable for our recordset
Dim count
%>