Use ASP to display Oracle data records by PAGE

Source: Internet
Author: User

This article describes how to use ASP to display data records in Oracle.

I. Introduction

Pagination is required when you access a table with a large amount of data through a browser. ASP can display database records by page through the ADO object set Recordset object. Recordset has the following attributes for pagination:

PageSize: the number of records displayed on each page.

PageCount: the system automatically calculates the total number of pages based on the user-defined PageSize and the total number of records in the table. RecordCount: Total number of records in the table.

AbsolutePage: indicates the current page number. If the attribute AbsolutePage is set to 3, the current record is moved to 3rd (that is, 1st records) on page 1 ).

After knowing that Recordset has these attributes, I believe that it is very easy to display records by page. Open the database and table, set PageSize and AbsolutePage, and output the recorded data to the browser. It is true that Access or SQL server is used as a database, because both databases support the Recordset attributes for paging. Compared with Access or SQL server, Oracle databases provide better security and superior performance when the data volume is large. However, Oracle does not support these paging attributes. This article introduces a method to display Oracle data records by page using ASP, so that Oracle users can easily display records by page.

II. Implementation Process Analysis

1. Create a Data source:

Install the Oracle client software and use the microsoft odbc for oracle driver to create a DSN such as "DSN = servername; UID = user; PWD = password ".

2. Create a data table:

The simple structure of the personal data table is as follows (the table name is data ):

Data: name, Varchar2; telephone, Number; email, Varchar2;

  • 1
  • 2
  • Next Page
[Content navigation]
Page 1st: use ASP to display Oracle data records by PAGE Page 2nd: use ASP to display Oracle data records by PAGE

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.