Implementation of the paging display program for Oracle data records by ASP

Source: Internet
Author: User
Tags dsn mail sql table name
oracle| Program | pagination | data | show

In this paper, the step-by-step display of Oracle data records using ASP is elaborated.

first, the introduction

Paging is required to access a table with a large amount of data through a browser. ASP's paging display of database records can be achieved through the ADO object set Recordset object. The recordset has the following several properties for paging display:

PageSize: The number of records displayed per page.

PageCount: According to the user's set of pagesize and the total number of records in the table, the system automatically calculates total pages. RecordCount: The total number of records in the table.

AbsolutePage: Represents the current page number. If you set the AbsolutePage property to 3, the current record moves to page 3rd 1th (that is, 31st).

Knowing that the recordset has these attributes, I'm sure everyone thinks it's easy to achieve a paging display of the record. First open the database and table, and then set a good pagesize and AbsolutePage, and finally the record data output to the browser, you can do. Admittedly, it's as simple as using Access or SQL Server as a database, because both databases support the properties that are used by the recordset for paging. Oracle databases provide better security than access or SQL Server, and performance is dominant in the case of large amounts of data, but Oracle does not support these paging properties. This article will introduce a method of using ASP to realize the paging of Oracle data records, which makes it easy and easy for Oracle users to realize the paging display of records.

Second, the realization process analysis

1, the establishment of data sources:

Install the Oracle client software and create a DSN via Microsoft ODBC for Oracle driver: "DSN=SERVERNAME; Uid=user; Pwd=password ".

2, the establishment of data tables:

The simple profile structure is as follows (table name is data):

DATA:NAME,VARCHAR2;TELEPHONE,NUMBER;EMAIL,VARCHAR2;

3, program code Analysis (in this analysis only record display program display.asp):

       
        
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.