asp的通用数据分页类(4)
Public Property Get PageSize()
PageSize=Page_Size
End Property
''设置当前的页码数**************************
Public Property Let Page(ByVal Value)
If Not IsNumeric(Value) Or Value="" Then
Value=1
Else
Value=CLng(Value)
End If
If Value<1 Then Value=1
Cur_Page=Value
End Property
Public Property Get Page()
Page=Cur_Page
End Property
'/****************End******************************************
Private Sub Class_Initialize
'初始化RecordSet对象
Page_Size=10 '默认一页为10条数据
CurPage=1 '默认当前为第一页
Record_Count=0
Page_Count=0
End Sub
Private Sub Class_Terminate
Call CloseRecordSet
End Sub
'/***关闭数据库的连接*******
Private Sub CloseRecordSet
On Error Resume Next
If IsObject(Rs) Then
Rs.Close
Set Rs=Nothing
End If
On Error Goto 0
End Sub
'/**********执行查询返回对应页码的数据***********************************************
Public Function ExecuteBy(ByVal oTableName,ByVal oFields,ByVal oCondition,ByVal oOrderBy)
Table_Name=oTableName
内容版权声明:除非注明,否则皆为本站原创文章。