Originally posted by Andrew Nomos:
Hello,
in the JDBC API it is said that a ResultSet is an object that maintains a cursor pointing to its current row of data.
Yes this is correct
What does that mean in terms of memory?
It means that there is nothing being hold in your JVM's memory
For example, when I execute a database query that returns 500.000 records, the ResultSet will not acctually keep the 500.000 records, won't it? But what actually gets send to my machine?
Whenever you execute any query, a cursor is maintianed at database and every resultset.next() makes cursor to move at next row.
Hence every rs.next() casues a round trip to database, and current row is sent to your machine.
hope this answers to your question
Shailesh
[ June 30, 2005: Message edited by: Shailesh Chandra ]