To make a query return only the records you want, you want the query to look like this:
select COLUMN from TABLE where rowid in (
select rowid from TABLE where rownum <= :MAX
minus
select rowid from TABLE where rownum < :MIN)
The OracleQuery has 2 parameters:
:MAX Integer
:MIN Integer
:MAX is the upper limit of your query
:MIN is the lower limit of your query
So, if you want the records 25 to 45 you set the :MAX to 45
and the :MIN to 25 and execute the query.
To make it work like you want, you have to do the following.
(You need 2 buttons labeled 'Prev' and 'Next')
(The 'Next' button adds 10 to the :MIN and :MAX and excecute the query)
(The 'Prev' button substracts 10 from the :MIN and :MAX and execute the query)
1 Get the number of records in the table [Select count(rowid) from TABLE]
2 Set the :MAX to 10 and the :MIN to 1
3 Execute the query
4 For the next 10 records press the 'Next' button
5 For the previous 10 records press the 'Prev' button
You have to check if you have the first records to disable the 'Prev'
button and if you have the last records to disable the 'Next' button.
It doesn't crash, but simply don't give any records.
------------------
JohaViss