• 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

how to move to previous record

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using Swing Components in displaying records from the table. I used ResultSet for the records. I also put a next and previous button to view the data and assign it in JTextField. When I click on previous w/c is i used the previous() method in ResultSet, it will display a message that, TYPE_FORWARD_ONLY and when I add those parameters in order to set the ResultSet, it will display that feature is not supported. I used MS Access as my Database.
hope you can help me with that. thnx
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you need to create a scrollable ResultSet:

or using preparedStatement:

Jamie
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the above methods do not work for you (error message like "features not implemented") then your database driver can not use scrollable resultset because it does not support it. If this is the problem I would suggest changing your database to Postgres or mySQL (both free). There seems to be a lot of problems with the drivers to MS Access. If you are stuck using it, then try to download the latest version of your driver or find a better driver to connect to access with.
Postgres: http://apachetoday.com/news_story.php3?ltsn=2000-08-14-008-01-PR-MR-SW
Jamie
 
Yup, yup, yup. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic