Paging Modular Paging
1. Query statement block
Get the current file name
temp = Split (Request. ServerVariables ("URL"), "/"
FY = temp (UBound (temp))
Set Rs=server.createobject ("Adodb.recordset")
If not IsEmpty (Request ("page") Then
Pagecount=cint (Request ("page")
Else
Pagecount=1
End If
Sql= "SELECT query Statement"
Rs.Open sql,conn,1,1
rs.pagesize=10 Number of paging records
If Pagecount>rs.pagecount or pagecountPagecount=1
End If
If Rs.eof and Rs.bof then%>
Sorry, no records match the
: Current page number, pagesize: Paging size, URL: page address function pagelist (totalrecount,page,pagesize, URL) Dim Startpage,endpage,ipage,totalpage '//Determine the number of parameters after the link file if InStr (1,url, "?") = 0 Then url = URL "?" else url = URL "" End If//Get total page totalpage = totalrecount \ pagesizeif totalrecount mod pagesize End Function '//*************************************************************
'//Detect if
Data | database | online | Online number ' ********* use database to Judge online list and number online
' ********* system support: asp+access, tested on WINDOWS2000+IIS5
' *********login.asp*********
.
.
.
' Login to judge, slightly
.
.
' Login Successful
Session ("Name") =rs ("M_name")
Rs. Close
Strsql= "Update b_member Set m_isonline=yes,m_lasttime=now () Where m_name= '" +strname+ ""
Rs. Open Strsql,myconn
Response.Redirect "Xxx.asp"
SET rs=nothing
MyConn. Close
SET myconn=nothing
%>
, adOpenStatic, adLockOptimistic
If Rs. EOF Then
Getemployeename = ""
Else
Getemployeename = Rs. Fields (0)
End If
Rs. Close
End Function
' Return all Employees list
Public Function getemployeelist () as ADODB. Recordset
Dim strSQL as String
Set rs = New ADODB. Recordset
strSQL = "Select employeeid,lastname,firstname,title,titleofcourtesy,birthdate,hiredate,address,city from Employees "
Rs. CursorLocation = adUseClient
Rs. Open strSQL, Conn, adOpenStatic
Set getemploye
Tags: style blog color ar sp data div on artThe project needs to use the Sybase database paging function, to do all kinds of methods are not successful, and finally use the following stored procedures to successfully implement the function, record the memo.CREATE PROCEDUREJsp_query_page@sql varchar( -),@start int,@pageSize int as begin Declare @ipage int Declare @rcount int Declare @execsql varchar( -) Declare @sql1 varchar( -)
' ********* use the database to determine the online list and the number of people online' ********* system support: asp+access, tested on WINDOWS2000+IIS5' *********login.asp*********...' Login judgment, slightly..' Login SuccessfulSession ("Name") =rs ("M_name")Rs. CloseStrsql= "Update b_member Set m_isonline=yes,m_lasttime=now () Where m_name= '" +strname+ "'"Rs. Open Strsql,myconnResponse.Redirect "Xxx.asp"SET rs=nothingMyConn. CLOSESET myconn=nothing%>' *********refresh.asp*******...' Set t
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.