Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC and the fly likes Does data will be fecthed to client side? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Does data will be fecthed to client side?" Watch "Does data will be fecthed to client side?" New topic
Author

Does data will be fecthed to client side?

Ramesh Mandapati
Greenhorn

Joined: Mar 30, 2004
Posts: 3
After executing SELECT * FROM EMP;
if I use resultset.next(), resultset.absolute(5) methods on the resultset does it causes data to be fetched to client side? OR it just moves the pointer in the backend cursor.

Thanks,
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30356
    
150

Ramesh,
The data is brought back to the client side in batches. If your statement happens to hit the end of a batch, it will bring more data. If you use absolute() with a number that skips a whole batch of data, none of that data will be brought to the client side.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ramesh Mandapati
Greenhorn

Joined: Mar 30, 2004
Posts: 3
Originally posted by Jeanne Boyarsky:
Ramesh,
The data is brought back to the client side in batches. If your statement happens to hit the end of a batch, it will bring more data. If you use absolute() with a number that skips a whole batch of data, none of that data will be brought to the client side.


What happens if I use resultset.last(); resultset.getRowCount();
does data will be brought to client side?

Thx,
-Ramesh
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30356
    
150

Ramesh,
Again, it depends on the driver. Rowcount() isn't the most efficient way to get the number of rows though.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Does data will be fecthed to client side?