ASP通用分页类1.2.24

该ASP通用分页类主要是易用, 速度取决于实际应用: 自动使用Cookies缓存记录总数;若指定了统计语句(strSqlCount 属性), 则取决于该语句的统计效率; 若统计语句未指定, 则根据用户给定的查询语句, 取RecordCount属性值, 当然这样在首页显示时, 速度取决于记录总数, 效率不高. 若您在应用中遇到问题, 请使用MSN与我联系: xiaoyuehen(at)msn.com

 适用范围:


1. 用于一般分页需求, 只需指定查询语句及其他几个主要参数即可, 方便易用.
2.分页的速度取决于你给的 SQL 语句执行效率.
3.可指定记录数统计语句, 减少统计时间.
4.自动缓存记录数, 加快分页间跳转速度.
5. 若查询语句关键字经常变动, 置为不缓存, 以免影响查询结果.
6.若不喜欢类产生的分页导航, 可获得其他属性信息, 自己设定导航样式.

 相关属性:

strSQL : 只写(必要), 查询语句

strPageUrl : 只写(必要), 转向地址

strSQLCount : 可写, 记录数统计语句

intPageNow : 可读/可写(必要), 获得当前所在页 / 设置当前所在页

objConn : 只写(必要), 已打开的数据库连接对象, 当有多次使用时, 只需设置一次

getArray : 只读, 获取二维数组形式的当前页记录, 使用时, 必须用isarray()方法判断.

getRecordSet : 只读, 获取记录集对象, 游标已定位至当前页.

intPageMax: 只读, 获得总页数

strPageInfo : 只读, 获得默认分页样式

intRecordCount : 只读, 获得当前记录总数

intCache : 可写, 是否缓存记录数(Cookies), 默认缓存. 不缓存时需设置为 0

strPageVar : 可写, 设置页面传递参数, 默认为"page"

intPageSize : 可写, 每页显示记录数, 默认20

类文件:
rel="stylesheet" type="text/css" href="d:/htmlcode/style/aspvbs.css" />

%








Cls_PageView
sbooInitState
sstrPageUrl
sstrPageVar
sstrSql
sstrSqlCount
sintCache

sintRecordCount
sintPageSize
sintPageNow
sintPageMax

sobjConn

sstrPageInfo

sobjRs sbooInitRecordSet


strSQL

ClearVars
sstrSql



strSQLCount
sstrSqlCount



strPageUrl
sstrPageUrl



intCache
sintCache toNum



intPageSize
sintPageSize toNum



objConn
sobjConn



strPageVar
sstrPageVar



intPageNow
sintPageNow toNum



intPageNow
intPageNow sintPageNow



intPageMax
intPageMax sintPageMax



intRecordCount
intRecordCount sintRecordCount



strPageInfo
strPageInfo sstrPageInfo


Class_Initialize



class_terminate
sobjConn nothing


ClearVars
sbooInitState False
sstrPageUrl
sstrPageVar
sintCache

sintPageSize
sintPageNow
sintPageMax
sintRecordCount -1
sbooInitRecordSet False



InitPageInfo
sintPageNow sintPageNow
sintRecordCount sintPageSize
sintPageMax sintRecordCount sintPageSize

sintPageMax sintRecordCount sintPageSize

sintPageNow sintPageMax sintPageNow sintPageMax

sstrPageInfo

surl
surl sstrPageUrl
surl

surl
surl surl sstrPageVar

surl surl sstrPageVar


sintPageNow
sstrPageInfo

sstrPageInfo sstrPageInfo surl
sstrPageInfo sstrPageInfo surl sintPageNow


sintPageMax sintPageNow
sstrPageInfo sstrPageInfo

sstrPageInfo sstrPageInfo surl sintPageNow
sstrPageInfo sstrPageInfo surl sintPageMax


sstrPageInfo sstrPageInfo sintPageNow sintPageMax
sstrPageInfo sstrPageInfo sintRecordCount sintPageSize



toNums Default
s s
s s
toNum s

toNum Default




initRecordCountCache
intRecordCount
intRecordCount toNum
intRecordCount
sintRecordCount intRecordCount





setRecordCountCache
sintRecordCount
sintRecordCount




ReferPageWasCurrentPage
ReferPageWasCurrentPage true

strRefer strCurrent
strRefer
strRefer strRefer
strCurrent
strRefer strRefer strCurrent

ReferPageWasCurrentPage false



InitClass
sbooInitState True
sobjConn
sbooInitState False




sstrSql
sbooInitState False




sintPageSize toNumsintPageSize
sintPageSize sintPageSize
sbooInitState False




sintPageNow toNumsintPageNow



InitRecordSet
InitClass
sbooInitState





initRecordCountCache

rs sql bReferIsCurrent
bReferIsCurrent ReferPageWasCurrentPage
sql sstrSql

rs


bReferIsCurrent false sintRecordCount sintCache sstrSqlCount
rs sstrSqlCount sobjConn
rseof rsbof
sintRecordCount rs

sintRecordCount

rs







rs sql sobjConn


sintRecordCount
sintRecordCount rsRecordCount

sintRecordCount sintRecordCount


InitPageInfo

rseof rsbof
rsPageSize sintPageSize
rsAbsolutePage sintPageNow
sobjRs rs

sobjRs null



sintCache
setRecordCountCache


sbooInitRecordSet True


getRecordSet
sbooInitRecordSet False
InitRecordSet


sobjRs
getRecordSet null

getRecordSet sobjRs



getArray
sbooInitRecordSet False
InitRecordSet



sobjRs
sobjRseof sobjRsbof
getArray sobjRsgetrowssintPageSize

getArray

sobjRs
sobjRs nothing



sbooInitRecordSet False

getArray



%

你可能感兴趣的:(ASP,asp,function,cookies,sql,class,数据库)