Access2000数据库80万记录通用快速分页类__教程 |
|
日期:2007-5-20 1:26:37 人气:152 [大 中 小] |
|
|
|
If sintPageNow <= 1 then sstrPageInfo = "首页 上一页" Else sstrPageInfo = sstrPageInfo & " <a href=""" & surl & "1"">首页</a>" sstrPageInfo = sstrPageInfo & " <a href=""" & surl & (sintPageNow - 1) & """>上一页</a>" End If If sintPageMax - sintPageNow < 1 then sstrPageInfo = sstrPageInfo & " 下一页 末页 " Else sstrPageInfo = sstrPageInfo & " <a href=""" & surl & (sintPageNow + 1) & """>下一页</a> " sstrPageInfo = sstrPageInfo & " <a href=""" & surl & sintPageMax & """>末页</a> " End If sstrPageInfo = sstrPageInfo & " 页次:<strong><font color=""#990000"">" & sintPageNow & "</font> / " & sintPageMax & " </strong>" sstrPageInfo = sstrPageInfo & " 共 <strong>" & sintRecordCount & "</strong> 条记录 <strong>" & sintPageSize & "</strong> 条/页 " End Sub Rem ## 长整数转换 Private function toNum(s, Default) s = s & "" If s <> "" And IsNumeric(s) Then toNum = CLng(s) Else toNum = Default End If End function Rem ## 类初始化 Public Sub InitClass() sbooInitState = True If Not(IsObject(sobjConn)) Then sbooInitState = False Call InitRecordCount() Call InitPageInfo() End Sub End Class Dim strLocalUrl strLocalUrl = request.ServerVariables("SCRIPT_NAME") Dim intPageNow intPageNow = request.QueryString("page") Dim intPageSize, strPageInfo intPageSize = 30 Dim arrRecordInfo, i Dim Conn f__OpenConn Dim clsRecordInfo Set clsRecordInfo = New Cls_PageView clsRecordInfo.strTableName = "[myTable]" clsRecordInfo.strPageUrl = strLocalUrl clsRecordInfo.strFieldsList = "[ID], [Title], [LastTime]" clsRecordInfo.strCondiction = "[ID] < 10000" clsRecordInfo.strOrderList = "[ID] ASC" clsRecordInfo.strPrimaryKey = "[ID]" clsRecordInfo.intPageSize = 20 clsRecordInfo.intPageNow = intPageNow clsRecordInfo.strCookiesName = "RecordCount" clsRecordInfo.strPageVar = "page" clsRecordInfo.intRefresh = 0 clsRecordInfo.objConn = Conn clsRecordInfo.InitClass |
|
出处:本站原创 作者:佚名 |
|
|