An example of a stored procedure that can return a subset of a ResultSet can be found here.
This is interesting in that it illustrates (see method #3) how to create a subset without temp tables. Although it initially selects all records in the table, marshalling a huge ResultSet object out of the DB Server does not occur.
The downside is that there is no way to determine that the last record in the subset being returned might represent the last record in the table, preventing messages being issued to the user that says something like "You have reached the end of file." or "No records exist beyond this page." or perhaps to remove the "Next Page" navigation button from the JSP.
For perphaps a better strategy, read the posting about CachedRowSet, above.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment