The implementation of the "ASP" database query content paging display (click Open link) in the last write, although it can achieve the desired effect in a particular table,
However, after the algorithm was ported to other systems, it was found that the generality was not strong
First, the implementation of this paging algorithm is through the database background ID number of the distinction of each page,
In some tables, this algorithm fails if the ID result of the query is out of order.
At the same time, the link to page turn is dead, and no macro is implemented to determine the name of this page.
Therefore, must be through a large number of changes to achieve this algorithm, but the fundamental idea is still unchanged, but also the "ASP" database query content paging Display V2 bar!
First, the basic idea
1. The name of the page can be obtained through the program, then this page is placed in any location, is modified to any file name, the algorithm will not be invalidated.
2. Upper and lower,total,pages have been set up, but the method of calculation has changed.
3. In particular, each page is queried for the full table record, then, in the foreground to determine the scope should be calculated.
Second, the production process
The implementation of the function and "ASP" Database query content page display "(Click Open link) there is no difference
However, the overall code changes notconsistent a lot. See the comments for each line for details.
<!--ASP page must have this sentence, otherwise the page garbled--><% @LANGUAGE = "VBSCRIPT" codepage= "65001"%><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
The improvement of "ASP" to the content paging display algorithm of database query