p;Function FindByPage(PageSize,CurrentPage,WhereValue,OrderValue)
Dim parms,SQL,objRS
Dim s1
If CurrentPage="0" Then
s1 = PageSize & "|" + OrderValue & "|" & WhereValue
parms = Split(s1,"|")
SQL = mycom.Format(SQL_05,parms)
Else
s1 = PageSize & "|" & OrderValue & "|" + WhereValue & "|" & CurrentPage*PageSize
parms = Split(s1,"|")
SQL = mycom.Format(SQL_06,parms)
End If
Set objRS = myacc.ExecuteReader(myacc.CONN_STRING,SQL)
Set FindByPage = objRS
End Function
Private Sub Class_Initialize()
SQL_01 = "Select * From [Guest] Where Id = {0}"
SQL_02 = "Insert into [Guest] ([Content],[Re],[Addtime],[Ip]) values(''{0}'',''{1}'',''{2}'',''{3}'')"
SQL_03 = "Update [Guest] Set [Content]=''{1}'',[Re]=''{2}'',[Addtime]=''{3}'',[Ip]=''{4}'' Where Id = {0}"
SQL_04 = "Delete From [Guest] Where Id In ({0})"
SQL_05 = "Select Top {0} * From [Guest] Where Content Like ''%{2}%'' Order By {1} Desc,Id Desc"
SQL_06 = "Select Top {0} * From [Guest] Where Content Like ''%{2}%'' And Id Not IN(Select Top {3} Id From [Guest] Where Content Like ''%{2}%'' Order By {1} Desc,Id Desc) Order By {1} Desc,Id Desc"
SQL_07 = "Select * From [Guest] Where Content Like ''%{0}%'' "
Set mycom = new Common
Set myacc = new AccHelper
Set mymod = new MOD_Guest
End Sub
Private Sub Class_Terminate()
Set mycom = Nothing
Set myacc = Nothing
Set mymod = Nothing
End Sub
End Class
%>
MOD_Guest.asp
<%
''/// <summary>
''/// 摘要说明。
''/// </summary>
Class MOD_Guest
Public Id
Public Content
Public Re