File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying the next set of a resultset with a next JButton

 
Jeff Foflygen
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello,

I have an application that is currently working in returning data from an oracle database. The place where I am getting stuck is display the next set of a resultset with the click of a JButton called "Next" The resultset returns 15 line items, based on a variable that I pass to it from the swing application. some have 3 sets of 15 line items. Here is the code I have in place so far, any help or thoughts would be much appreciated.

Thanks!
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That depends on the DB in question. Basically you need to invoke a SQL query which returns only an ordered subset of rows from the database. For the ordering you can use the standard ORDER BY clause and for returning subsets you need to consult the SQL documentation of the DB in question. Mostly it's the LIMIT and/or OFFSET clause, but for some DB's you need to write a stored procedure.
 
Jan Cumps
Bartender
Posts: 2575
11
C++ Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JavaRanch FAQ has some suggestions on paginating, and on getting the next set of records.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic