Members List
<%
Dim MbrConn, MbrRs, MbrQry, curPage, pageSize, numPages, i
Set MbrConn = Server.CreateObject("ADODB.Connection")
MbrConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("aijbeass.mdb")
Set MbrRs = Server.CreateObject("ADODB.Recordset")
MbrRs.Open "SELECT * FROM Members ORDER BY CompanyName", MbrConn, adOpenKeyset, adLockOptimistic
%>
<% ' Paging the Content
pageSize = 25
If MbrRs.RecordCount <> 0 Then
If Request.QueryString ("page") <> "" Then
curPage = CInt (Request.QueryString("page"))
Else
curPage = 1
End If
End If
If MbrRs.RecordCount <> 0 Then
MbrRs.PageSize = pageSize
numPages = MbrRs.PageCount
If curPage > numPages Then curPage = numPages
MbrRs.AbsolutePage = curPage
End If
%>
Id |
Firm Name |
Address |
City |
|
<% Do While pageSize > 0
If MbrRs.EOF Then
Exit Do
End If
If MbrRs("ActiveStatus") <> "A" Then
MbrRs.MoveNext
Else
If i mod 2 <> 0 Then %>
<% Else %>
<% End If %>
<% MbrRs.MoveNext
pageSize = pageSize - 1
i = i+1
Application("totRec") = Application("totRec") + 1
If MbrRs.EOF Then
Exit Do
End If
End If
Loop
%>
|
<% If curPage > 1 Then %>
<%= " Previous Page" %>
|
<% Else %>
|
<% End If %>
<% If curpage < numPages Then %>
<%= " Next Page" %> |
<% Else %>
|
<% End If
MbrRs.Close
MbrConn.Close
Set MbrRs = Nothing
Set MbrConn = Nothing
%>
<% End If %>
<% If i = 1 Then %>
No
Members
to List
|
| |