[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How can I limit the number of records returned by ASP?

Posted on 1998-09-17
1
Medium Priority
?
152 Views
Last Modified: 2013-12-25
I would like to limit the number of records returned on a single page by ASP like yahoo does. ie 30 records are returned by only 10 appear per page.  I am not sure how ASP saves the records I am not listing.
0
Comment
Question by:whitej8
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 28

Accepted Solution

by:
sybe earned 800 total points
ID: 1855098
There are several ways, you can use "bookmarks" in recordsets, but it can also be done much simpler.

For the first page
========================
intMax = 30
i = 0
Do While Not RS.EOF AND i <= intMax
  Response.write RS("yourdata") & "<br>"
  i = i + 1
RS.MoveNext
Loop
=======================


For all next pages, you can have a "startvalue", which you need to pass in a querystring/form.

Something like:

intStart = Request.Querystring("startvalue")
intMax = intStart + 30

RS.Move(intStart)

intMax = 30
i = intStart
Do While Not RS.EOF AND i <= intMax
  Response.write RS("yourdata") & "<br>"
  i = i + 1
RS.MoveNext
Loop


0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

650 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