Access 2000 数据库 80 万记录通用快速分页类(2)
Private sstrPageUrl
Private sstrPageVar
Private sstrTableName
Private sstrFieldsList
Private sstrCondiction
Private sstrOrderList
Private sstrPrimaryKey
Private sintRefresh
Private sintRecordCount
Private sintPageSize
Private sintPageNow
Private sintPageMax
Private sobjConn
Private sstrPageInfo
Private Sub Class_Initialize
Call ClearVars()
End Sub
Private Sub class_terminate()
Set sobjConn = nothing
End Sub
Public Sub ClearVars()
sbooInitState = False
sstrCookiesName = ""
sstrPageUrl = ""
sstrPageVar = "page"
sstrTableName = ""
sstrFieldsList = ""
sstrCondiction = ""
sstrOrderList = ""
sstrPrimaryKey = ""
sintRefresh = 0
sintRecordCount = 0
sintPageSize = 0
sintPageNow = 0
sintPageMax = 0
End Sub
Rem ## 保存记录数的 Cookies 变量
Public Property Let strCookiesName(Value)
sstrCookiesName = Value
End Property
Rem ## 转向地址
Public Property Let strPageUrl(Value)
sstrPageUrl = Value
End Property
Rem ## 表名
Public Property Let strTableName(Value)
sstrTableName = Value
End Property
Rem ## 字段列表
Public Property Let strFieldsList(Value)
sstrFieldsList = Value
End Property
Rem ## 查询条件
Public Property Let strCondiction(Value)
If Value <> "" Then
sstrCondiction = " WHERE " & Value
Else
sstrCondiction = ""
End If
End Property
Rem ## 排序字段, 如: [ID] ASC, [CreateDateTime] DESC
Public Property Let strOrderList(Value)
If Value <> "" Then
sstrOrderList = " ORDER BY " & Value
Else
sstrOrderList = ""
End If
End Property
Rem ## 用于统计记录数的字段
Public Property Let strPrimaryKey(Value)
sstrPrimaryKey = Value
End Property
Rem ## 每页显示的记录条数
Public Property Let intPageSize(Value)
sintPageSize = toNum(Value, 20)
End Property
Rem ## 数据库连接对象
Public Property Let objConn(Value)
Set sobjConn = Value
内容版权声明:除非注明,否则皆为本站原创文章。