Hi, I am trying to page the records in d/b using java.sql package. I need 2 records on each subsequent fetch. I got first set of records, but i could not be able to fetch next two records from d/b. This is my program hereafter..
The second setMaxRows is setting it to 4-2, which is two. So you are doing the same query (first two rows) repeatedly. I don't think this can be done completely in Java because not all databases support it. There's a good article that shows how to to it in Oracle.