ASP stored Procedure Paging code 1th/2 Page _ Application Tips

Source: Internet
Author: User
The stored procedure is done in the form of select top plus not, and the speed is pretty fast. I've tested the millions. General query in 1 seconds, paste out the exchange, to see if there are any good suggestions.
A few simple words can achieve paging function, please see Code:
Easiest to use (for any data table):
Test.asp
Copy Code code as follows:

<!--#include file= "conn.asp"-->
<!--#include file= "page.asp"-->
<%
Set my = New Page
With my
. Setconnstr=connstr ' Database link string
. setstrtable= "Users" table name
. setstrtext= "Id,username,type,names" query fields
. setstrindex= "id" PRIMARY key
Rsarray=. Getrs () ' Returns data, type array
End With
%>
<table>
<%
If IsArray (Rsarray) Then
For i = 0 to UBound (Rsarray, 2)
%>
<tr>
<td><%= Rsarray (0, i)%></td>
<td><%= Rsarray (1, i)%></td>
<td><%= Rsarray (2, i)%></td>
</tr>
<%
Next
End If
%>
<tr>
<TD colspan= "4" > Total <%= my.gettotalnum%> strip per page <%= my.getipagesize%> strip total <%= my.gettotalpage%> page page: & lt;%= my.getfenyejmp (False)%></td>
</tr>
</table>

550)this.width=550;">550)this.width=550;">
Current 1/2 page 12 Next read the full text

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.