File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Paging" Watch "Paging" New topic
Author

Paging

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
Sheriff

Joined: Dec 11, 2004
Posts: 13410

It looks like quite a few people have posted workarounds for this issue.
http://www.google.com/search?hl=en&q=SQL-SERVER+paging+limit&btnG=Google+Search

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
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Moving to JDBC where our MS-SQL Server gurus hang out.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Paging
 
Similar Threads
how to Setnumber of rows per page and max number of rows
How to display variant number of record each page based on user's request ?
How to display variant number of record each page based on user's request ?
Tables in servlets/JSP(Urgent !!)
Add values of a column