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

ResultSet absolute(), relative()

 
Navin Pillu
Ranch Hand
Posts: 103
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I want to know the difference between absolute() & relative(). Because both are giving same output.

And also want to know how can i fetch rows indexing from 70 to 80 from 100 rows or similar functionality.

Thanks in advance
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Navin Pillu:
I want to know the difference between absolute() & relative(). Because both are giving same output.


javadocs is the answer, check here the description of both method


want to know how can i fetch rows indexing from 70 to 80 from 100 rows or similar functionality.


I am sorry but this is not clear to me, to fetc rows from 70 to 80 you can
go to 70th row by rs.absolute(70) then fetch next 10 rows

Shailesh
 
Navin Pillu
Ranch Hand
Posts: 103
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shailesh

Thanks for giving reply. I went through link & understood point. But Second point is also important. If i have 10000 rows in that case if i used this solution that is fetching rows & moving cursor will take more time. So i want practical solution.

If anybody has practical solution for this please let me know

Thanks in advance
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont think row numbers are would be a critaria to fetch rows unless it is case of paging ,because rows order can be change with respect to your Order by clause.

It order to fetch records from database minimize them at query execution level with your where clause,otherwise use some runnig number column in your table so that you can filter your rows

I dont have any practical figures for cursor movement but I dont think it will take as much observable time that application suffer.

Shailesh
[ July 06, 2005: Message edited by: Shailesh Chandra ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic