• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Displaying the next set of a resultset with a next JButton

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JavaRanch FAQ has some suggestions on paginating, and on getting the next set of records.
reply
    Bookmark Topic Watch Topic
  • New Topic