aspose file tools*
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 Spring in Action this week in the Spring 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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30752
    
156

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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30752
    
156

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?