Page 1/2 of ASP Stored Procedure Code

Source: Internet
Author: User

The storage process is completed using the select top plus not in method, and the speed is quite fast. I tested a million-level data volume and generally queried it in 1 second. I will post it for your discussion, check whether there are any good suggestions.
The paging function can be implemented in a few simple sentences. Please refer Code :
The simplest way to use (applicable to any data table ):
Test. asp Copy code The Code is 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 field
. Setstrindex = "ID" 'primary key
Rsarray =. getrs () 'returned data, type: Array
End
%>
<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
%>
<br>
<TD colspan = "4"> total <% = My. gettotalnum %> entries per page <% = My. getipagesize %> total <% = My. gettotalpage %> page number: <% = My. getfenyejmp (false) %> </TD>
</Tr>
</Table>

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.