Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> getting X rows at a time via JDBC (i.e. no cursors)
Hello,
This seems like it is a FAQ, but I can't find any answers applicable to my situation...again :(
Platform: Oracle 8i on Linux, JDBC.
How does one go about getting X rows from a database (Oracle 8i) at a time without using stored procedures and CallableStatements?
I know I could get all the rows once, store the ResultSet and then get X elements from it at a time, but I don't want to store ResultSets (I think they would use a ton of memory in my app)
I read some docs over on technet.oracle.com that mention ROWID, but their examples show only queries with '...WHERE ROWID > somethinghere' But what I really need is something like '...WHERE ROWID > X AND ROWID < X+10'
(where X is a number)
ROWIDs in my database are not stored as numbers so I can't do something like WHERE ROWID > 0 AND ROWID < 11. They seem to be stored as some kind of hex(?) value (i.e. alphanumeric characters) which means I can't use < and > operators...unless I convert those ROWID values to integers, but I'm afraid that such a conversion would become very expensive as the number of rows increases.
Any help would be appreciated.
Thank you,
Otis
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Apr 11 2000 - 00:00:00 CDT