winzip icon

ListView Pagination with ADO - Complete Demonstration

Submitted on: 1/3/2019 6:00:55 AM
By: PGB Prasanna 
Level: Intermediate
User Rating: By 3 Users
Compatibility: VB 6.0
Views: 4946

Pagination is the technique or the process of displaying large datasets by splitting them into multiple pages. For an instance, just imagine a situation, where a user needs to show several thousand records from start to the end. In such situation, you can use paging technique to show limited number of records per page at a time, where user can navigate from page to page rather than by showing all of them in one display. Proper implementation of pagination greatly increases the application performance together with less system resource utilization.

What is ListView Pagination with ADO?

Using a ListView (specially 5.0 ListView supporting modern visual styles) is a common and popular approach among database programmers to display information. So the ListView pagination with ADO, can be considered to be how features of ADO are utilized to implement pagination with a ListView.

Why ListView pagination?

Populating a ListView with large number of database records in the general way is a time consuming process and would not be a good UI design practice. The implementation of Listview pagination with ADO carefully together with other database design considerations such as indexes can be used to handle fairly large datasets with several thousands or millions of records effectively. Further, Listview pagination gives your interface a highly professional look with increased usability.

What does this demo application demonstrate?

This is a complete demonstration application showing how to effectively use paging stuff encapsulated into a class. It primarily demonstrates the following aspects with a dataset of hundred thousand (100,000) dummy records in a MS Access database.
  • Basic navigation operations including moving to First, Previous, Next and Last pages.
  • Specialized navigation techniques for going to a specific page or a specific record by the row number.
  • Work with different datasets
  • Work with different page sizes
  • Sorting with column headers supporting all columns
  • Retrieving paging related information including total rowset count, page count, page size, current page and its row number boundaries.
  • For a better performance, try the demo application with its EXE.
  • This is a demonstration application specially targeting beginners. So some of its features are designed for demonstration purpose only.
  • The application supports for both client-side and server-side cursors. Try with each and you evaluate them with your requirement.
  • Note that the efficiency of paging related operations are considerably depends on the database design considerations such as proper indexing of relevant fields.
  • Never think of applying ADO paging features with very large datasets of billings or trillions of records. In such situations, specialized server-side paging techniques with the database server or virtual approaches would be great.
  • Remember, showing or navigating records in large datasets is NOT a good UI design approach, where you should always TRY to limit the dataset with user inputs.
You can watch the video demonstration below.

winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net

Other 11 submission(s) by this author


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)

Other User Comments

5/9/2020 8:02:13 AMjafer

super coding
(If this comment was disrespectful, please report it.)


Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)

To post feedback, first please login.