Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 26th, 2005, 10:06 AM
Friend of Wrox
 
Join Date: Mar 2005
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to add paging for access db using asp

Hi guys. I want to make a page that loads some records from access db and once i click on click on a button it goes and loads the rest of records. Just like the pic in the url below. I be happy if some one show me an example on how to do it .Thanks


http://i5.photobucket.com/albums/y18...d007/table.gif
 
Old June 3rd, 2005, 02:12 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

I am not sure if you are looking for code that does it for you. I can tell you the way of doing it. And not sure if you are looking for doing this using ASP / .Net, no mention about that.

1) declare variables for use.
2) Define Connectionstring to connect to your access db.
3) Open a connection to the db using the connectionstring defined.
4) Do a select on the table in question and show only the columns that are required.
5) Have a while loop that iterates through till the last records in the recordset.
6) Within the loop load the relevant columns in to correspondng variables.
7) Show the relavant columns on page.
8) For READ MORE link, pass the primarykey / ID sort of value that you sue in the table for every row.
9) Do not forget to close the connection/reset the recordset/connection objects etc...

When clicked on READ MORE,
1) Capture the primarykey value passed along with it and do similar steps to connect to table, query for that primarykey value based row from the table, and show up that on the page as mentioned above. But in this case, you get just one row, so you wont need a loop sort for there.

Hope that helps.

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Add New Record in Access DB sidra Classic ASP Databases 1 June 2nd, 2008 01:13 PM
DB recordset paging using ajax paging? kumiko Classic ASP Basics 0 May 26th, 2008 10:23 AM
ASP | db recordset paging PLEASE HELP!! burns Classic ASP Basics 0 February 26th, 2006 09:43 AM
inserting yes/no value into Access DB using ASP pablohoney Classic ASP Basics 1 September 20th, 2005 12:00 AM
How to add paging option to my datagrid method ASP.NET 1.0 and 1.1 Basics 1 May 22nd, 2005 07:04 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.