473,320 Members | 1,922 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

how to divide recordset to sets of pages

35
hi,
i need help to realise some paging through an ado Recordset
my question is how to divide the result into chunks of pages and make links to each chunk like 1-10 first pages 10-20 ... pages
i tried to use absolutePosition with absolutePage but it won't work if absolutePosition is set before absolutePage was set, it's like it only works inside a page ..
anyway , any help is much appreciated
Oct 9 '06 #1
2 1782
You have to divide total record count with the number ( which is number of records u want to display)
Oct 11 '06 #2
r_o
35
yeah hi and thanks for the reply,

i sort of procured a solution,but i'm interseted in knowing if ado provides such a functionality.
Expand|Select|Wrap|Line Numbers
  1. <%
  2. nPageCount=Rs.PageCount
  3. currentPage=CLng(request("page"))
  4. iStart=request.QueryString("start")
  5. if iStart="" then istart=1
  6. if request.QueryString("origin")="set" then currentPage=clng(iStart)
  7. Rs.AbsolutePage=currentPage
  8.  
  9. iFinish=iStart+14
  10. min=nPageCount
  11.     if iFinish<min then min=iFinish
  12.     for j=istart to min  
  13.         if j=currentPage then 
  14.             response.Write j
  15. else%>
  16.   </span><a href="all.asp?<%=querystr%>&page=<%=j%>&amp;start=<%=iStart%>"><%=j%></a>&nbsp;
  17.   <%      end if
  18.     next
  19.     for k=min+1 to iFinish
  20.         response.Write("<A href='#' style='visibility:hidden'>00</A>&nbsp;")
  21.     next
  22.     follow=nPageCount
  23.     if iFinish<nPageCount then 
  24.         iStart=iFinish+1
  25. %>
  26.   <a href="all.asp?<%=querystr%>&page=<%=j%>&amp;start=<%=iStart%>&origin=set">"><img src="images/next.gif" width="20" height="20" alt="Next 16" border="0"/></a>
  27.   <% else %>
  28.   <img src="images/rightyellow.gif" width="20" height="20" border="0" />
  29.   <% End If %>
  30.  
now what you are saying about dividing the total record count with the number of links to pages i wanna display,can you be more specific and show me how
Oct 11 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Steve | last post by:
I have implemented the Stored Procedure "RowCount" method of controlling paged recordsets in ASP as shown in this page http://www.aspfaq.com/show.asp?id=2120. I have had to make heavy...
4
by: LaiLakY | last post by:
Hi all I want to divide long HTML page (paging) into smaller pages. I know how to do it if I use recordset but in my project, I dont need to read from a Database, I'm reading a file system wich...
2
by: wallconor | last post by:
Hi, I am having a problem using Dreamweaver CS3 standard recordset paging behavior. It doesn’t seem to work when I pass parameter values from a FORM on my search page, to the recordset on my...
3
by: phill86 | last post by:
Hi, i have a recordset in a function that is called on the afterupdate event in a form Basically the recordset finds the relevant session records and adds up how long, in hours, the sessions...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.