The improvement of "ASP" to the content paging display algorithm of database query

Source: Internet
Author: User
Tags servervariables

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

Related Article

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.