Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

When is the data in the resultSet brought over ?

 
Per Lovdinger
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Could somebody explain this.
Assuming I'm running this query at host1 and the database
resides at host 2 and the number of rows in the rowset is 1000.
- When is the data in the resultSet brought over to host1 ?
- is it at *1* ?
- at *2* but only 1 row ?
- at *2* but the number of rows depends on "fetchsize" for resultset ?
- some other idea ...

ResultSet results = prepStmt.executeQuery();
*1*
while (results.next())
{
*2*
System.out.println("DAte is " results.getString(2));
}

regards Per
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic