Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Paginating query results using Oracle 7.3.4 and JDBC
I want to be able to paginate the results of a database query in the
same fashion as search engines on the web - ie when we perform the
query we want to be able to specifiy the number of records on a "page",
determine how many "pages" there are, and be able to navigate between
them (not necessarily sequentially).
My first thoughts were to open a cursor in a PL\SQL procedure \ function and fetch the results into either a PL\SQL table, a VARRAY, or a temporary database table. However JDBC has no support either a PL\SQL table or a VARRAY, so that only seems to leave calling a PL\SQL procedure \ function that will write the "pages" out to a database table and then doing a select from JDBC.
Does this seem like an acceptable solution or can anyone suggest something better ? Is there any potential problems with using this solution in a multi-user environment ( ie locks causing table access problems etc ) ?
If anyone has any source code \ documentation I could use as an example that would be a major bonus.
Thanks,
Neil Houghton.
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Oct 21 1999 - 10:16:19 CDT