Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes JDBC and Relational Databases and the fly likes Paging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Paging" Watch "Paging" New topic


Kudret Serin
Ranch Hand

Joined: Aug 02, 2005
Posts: 167

I have a table which has 100 rows. I want to show 20 rows per page. When the user clicks next, the next 20 records will be shown. How can i implement it? (MS SQL 2000 Server does not support LIMIT)
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

It looks like quite a few people have posted workarounds for this issue.

For small result sets, there is no reason that you couldn't create your own form paging in Java by writing all the rows to a list and only displaying the rows you like but I would make a serious attempt to limit the size of the results from the database first. A query that returns 50k rows could have a serious impact on your app.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Moving to JDBC where our MS-SQL Server gurus hang out.
Have you tried LearnNowOnline?
subject: Paging