Solved

Select a particular set of records from MSACCESS table

Posted on 2007-03-26
3
244 Views
Last Modified: 2010-04-25
I have 10 asp pages. I have an MSACCESS table with say some 300 records. I want to select last 10 records ie. rows 290-300 from the table and display it in the first asp page. Then, I want to select the rows 280-290 in the second asp page etc....The number of records in the table are not limited to 300, it keeps growing. I want a select query to take the last 10 records. I have an answer for that,
"select top 10 * from link order by id desc"
This query returns the latest 10 rows from the table, ie. rows 290-300
Now I want to select the rows 280-290. Is there any select query for that. Or can I achieve that is asp coding?

Any hep is appreciated
Thank you.
0
Comment
Question by:CWS (haripriya)
3 Comments
 
LVL 11

Accepted Solution

by:
walkerke earned 250 total points
ID: 18798211
0
 
LVL 9

Expert Comment

by:TheSloath
ID: 18798248
select top 10 * from link WHERE id <= 290 order by id desc
0
 
LVL 8

Expert Comment

by:jawahar_prasad
ID: 18798963
Hi...
I think you need pagination script...

here is a complete solution for your problem...
http://www.aspin.com/home/tutorial/database/display/pagingre
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now