• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jdbc

 
chowdaryv
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i move to last record using resultset.next() then how should i go to first record.
 
Milind Kulkarni
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I would prefer to store the ResultSet in some kind of container such as Vector. Vectors have a number of methods with which you can move up and down. The most important thing about Vectors is that they are Serializable where as ResultSet is not.
Regards,
Milind
 
Milind Kulkarni
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Also check out the new feature in the JDBC 2 API; is the ability to move the result set's position forward or backward. You can make the ResultSet scrollable using the following statement:
Statement stmt = con.createStatement( ResultSet.TYPE_SCROLL_SESITIVE, ResultSet.CONCUR_READ_ONLY);
Specifying the ResultSet.TYPE_SCROLL_SESITIVE does not automatically make the ResultSet scrollable. The driver and the DBMS should also support this option.

Hope this helps !!
Regards,
Milind

[This message has been edited by Milind Kulkarni (edited July 05, 2000).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic