aspose file tools*
The moose likes JDBC 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
Bookmark "rs.get???" Watch "rs.get???" New topic
Author

rs.get???

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
Greenhorn

Joined: Apr 21, 2001
Posts: 22

Saradha:
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 rs.next() .. 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.
Prem


<a href="mailto:pondyprem@yahoo.com" rel="nofollow">pondyprem@yahoo.com</a> <br />Sr.Programmer Analyst ( Bioinformatics)<br />Monsanto Entrprises
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: rs.get???