File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes rs.get??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "rs.get???" Watch "rs.get???" New topic


Sarada Bhasker
Ranch Hand

Joined: Sep 11, 2000
Posts: 94
Hi Friends,
When I do a rs.getxxx(x) ,am I going back to the database server and fetching the row from the database cache or am I getting the resultset copied to my in my program's memory?
prabhat kumar
Ranch Hand

Joined: Apr 11, 2001
Posts: 114
it gets copied in to ur program memory
Premkumar N

Joined: Apr 21, 2001
Posts: 22

The ResultSet object fetches based on the row-fetch-size you've specified. and stores it in your program-space .. but once you exhaust this resultset repeatedly-using .. it again goes back to the database and fetches again.

setFetchSize(int rows)
JDBC 2.0 Gives the JDBC driver a hint as to the number of rows that should befetched from the database when more rows are needed for this result set.

<a href="" rel="nofollow"></a> <br />Sr.Programmer Analyst ( Bioinformatics)<br />Monsanto Entrprises
I agree. Here's the link:
subject: rs.get???
It's not a secret anymore!