The stored procedure is completed by select top plus not in, and the speed is quite fast. I have tested the amount of data in a million. Generally, the query is in 1 second. I will post it to communicate with you to see if there are any good suggestions.
A few simple sentences can realize the paging function, please see the code:
Easiest way to use (for any data table):
test.asp
The code copy 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() 'Returns data, type is 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 %>List per page<%= My.GetTitalPageSize %>List in total<%= My.GetTotalPage %>List in total<%= My.GetTotalPage %>Page number: <%= My.GetFenYeJmp(false) %></td>
</tr>
</table>
550)this.width=550;">
12Next page Read the full text