查询翻页优化第1/2页

2019-01-14 07:28:05丽君

    '//取得当前查询的条件
    Public Property Get Condition
        If Len(sCondition)<1 Then makeCondition()
        Condition = sCondition
    End Property

    '//取得总的记录数
    Public Property Get TotalRecordCount
        If isNull(iTotalRecCount) Then CaculateTotalRecCount()
        TotalRecordCount = iTotalRecCount
    End Property

    '//取得总页数
    Public Property Get PageCount
        If isNull(iPageCount) Then CaculatePageCount()
        PageCount = iPageCount
    End Property

    '//得到分页后的记录集
    Public Property Get Recordset
        On Error Resume Next
        sSql = getSql()
        Set Recordset = oConn.Execute( sSql )
        If Err Then
            If bShowError Then doError Err.Description
            If Len(sSqlString)>0 Then
                Set Recordset = oConn.Execute( sSqlString )
                If Err Then
                    doError Err.Description
                    Response.End()
                End If
            Else
                doError Err.Description
            End If
        End If
        Err.Clear()
    End Property

    '//版本信息
    Public Property Get Version
        Version = sVersion
    End Property