Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 20th, 2003, 11:08 PM
linuskmj linuskmj is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 9 linuskmj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Displaying queries on multiple pages

I'm trying to display the first 15 queries on one page, and allow the user to click on the next page to display the next 15 pages and so on. However, I'm using JSP/IBM DB2 and DB2 doesn't have the limit function so I'm not sure how to go about it, would appreciate any assistance.

Thanks in advance.

Reply With Quote
  #2  
Old July 21st, 2003, 11:50 PM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 44 m 30 sec
Reputation Power: 8
Try using the following syntax:
select *
from table
first x rows only

Reply With Quote
  #3  
Old July 22nd, 2003, 05:33 AM
linuskmj linuskmj is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 9 linuskmj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi,
yes I've used that select statement for my first page, but how am I gona know if there are other rows in the table so that I can put a "next page" ?

Reply With Quote
  #4  
Old July 22nd, 2003, 06:16 AM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 44 m 30 sec
Reputation Power: 8
You will need to obtain the count(*) from resultset and work through the records.
Fifty records returned
Page 1: Display 15
Page 2: Display 15
Page 3: Display 15
Page 4: Display 5

Reply With Quote
  #5  
Old July 22nd, 2003, 06:19 AM
linuskmj linuskmj is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 9 linuskmj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
how do i go about getting the count ?
I'm totally clueless if say i link it to nextPage.jsp then how do i set it such that they would display
2 3 4 5 and so on ... ?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Displaying queries on multiple pages


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT