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 4th, 2005, 08:52 AM
Authorized User
 
Join Date: Jun 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default How display search results ? URGENT

Hai! friends,
  I have added a search facility in my project. The problem is,assume that 25 matches were found matching search criteria. I want to display these 25 results in 3 pages. i.e., 10 results a page. How to do it ?
 I have added a piece of code that I use to search the database.

########### Search Part starts here ##############
<%
  Dim rs_search,rs_user
  set rs_user=Server.CreateObject("ADODB.Recordset")
  set rs_search=Server.CreateObject("ADODB.Recordset")
  rs_search.open "SELECT DISTINCT dbo.userDetails.userID, dbo.userDetails.displayName FROM dbo.profileCategories INNER JOIN dbo.userDetails ON dbo.profileCategories.userID = dbo.userDetails.userID INNER JOIN dbo.Categories ON dbo.profileCategories.catID = dbo.Categories.catID WHERE (dbo.profileCategories.catID BETWEEN 2 AND 9)",Conn,1,2

  do while NOT rs_search.EOF
%>
  <P align="left">
  <b>PTID :</b><%= rs_search("userID") %><br>
  <b>Name :</b><%= rs_search("displayName") %><br>

  <Center><a href="../viewprofile.asp?PTID=<%= rs_search("userID")%>">
  <img src="../images/profile.gif" border="0" alt="View profile
  <%= rs_search("displayName") %>"></a><br></center>
  </p>
<%
  rs_search.movenext
  Loop
  rs_search.close
  set rs_search=NOTHING
%>

########### Search Part ends here ##############

  All I want to know is how to break the output and put it in multiple pages (displaying only 10 results per page)
Any reply appriciated
Regards,
Arul


Arul Kumar.PA
__________________
Arul Kumar.PA
 
Old March 4th, 2005, 09:46 AM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 303
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Recordset Paging

example
http://www.asp101.com/articles/recor...ging/index.asp

 
Old March 4th, 2005, 10:26 AM
Authorized User
 
Join Date: Jun 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks shahchi1 :)

Arul Kumar.PA





Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter double search results ABplace Beginning VB 6 3 June 28th, 2007 08:11 AM
How do I display search results... aspiretech9 PHP How-To 1 April 26th, 2005 10:12 AM
How do I display search results... aspiretech9 Beginning PHP 1 April 25th, 2005 04:59 PM
How do I display search results... aspiretech9 PHP Databases 1 April 25th, 2005 12:11 PM
Customize Search Results bmains ASP.NET 1.0 and 1.1 Professional 4 January 15th, 2004 08:51 AM





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