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