aspose file tools*
The moose likes JDBC and the fly likes how to obtain a resultset having fixed records Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how to obtain a resultset having fixed records" Watch "how to obtain a resultset having fixed records" New topic
Author

how to obtain a resultset having fixed records

smitha rai
Ranch Hand

Joined: Aug 15, 2001
Posts: 33
Hi,
I want to query the database and get the resultset for the first 10 records OR next 10 records OR any recordsbased on row number. I used rownum in my select query, but it works for only first record. Apprecite if some one could help me out.
Regards,
Smitha
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"smitha",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp.
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please edit your profile and select a new name which meets the requirements.
Please change your display name immediately since accounts with invalid display names get deleted. 14 posts is too many
Thanks.
Dave
Tanel Alumae
Greenhorn

Joined: Aug 26, 2002
Posts: 14
If I understand correctly, what you want to do is called resultset paging.
You can find much information on this topic in this thread
An exhaustive review of the topic with implementation is given in this article at serverside.com
[ September 09, 2002: Message edited by: Tanel Alumae ]

RefactorIT - Java Refactoring Tool<br /><a href="http://www.refactorit.com" target="_blank" rel="nofollow">www.refactorit.com</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to obtain a resultset having fixed records
 
Similar Threads
regarding MS access sql query
hi all problem in resultset
resultset
Fetch only 'n' records from the ResultSet
how to handle Search results?