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 March 11th, 2005, 10:04 AM
Registered User
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Calculate page of record

Hi!

I am working on a small app that displays information stored in a database (Access), 20 items per page.

My problem is that I would like is if I link to a specific record (for example "default.asp?ticket=25") I want the app to calculate the page of the record and redirect to "default.asp?page=2&ticket=25".

Anyone got ideas?
Thanks!

(Here are the columns of the table):
Code:
TICKET_ID
TICKET_MSG
CLIENT_ID
 
Old April 22nd, 2005, 08:25 AM
Registered User
 
Join Date: Apr 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What will count how many page you have?
I guess you could do a loop and have counter inside your loop.
<%
if countingquery.Bof and countingquery.Eof) then
  else

Counter=1
Do while not countingquery.eof

count=counter+1 'this count how many time you retrieve your information.
countingquery.Movenext
Loop
end if
response.redirect "default.asp?page="&Counter&"&ticket=25
%>





Similar Threads
Thread Thread Starter Forum Replies Last Post
5 record Per Page Makepeace1 Classic ASP Databases 2 June 2nd, 2008 01:21 PM
Data Access Page - New Record JeffGirard Access 5 December 7th, 2007 10:03 AM
WHy does it show 1 record per page instead of 10? gilgalbiblewheel Classic ASP Databases 2 April 27th, 2005 11:03 AM
dropdown list not selecting record on page load whyulil ASP.NET 1.0 and 1.1 Basics 1 September 8th, 2004 08:29 AM





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