Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does callableStatement.getInt method hit database?

 
Makrand Pare
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've a query regarding callableStatement. When we call callableStatement.execute() and then call getInt or getString or any getter method to get the out parameters of the procedure does it hit the database each time we call those getters or it returns the value from the object?

Thanks,
Makrand
 
Scott Selikoff
author
Saloon Keeper
Posts: 4014
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not for single calls of getInt() or getString() but possibly for calls of next() depending on the driver. Some drivers return all result set records, some do not, but once you have a single result set record, you have all the data in it.
 
Makrand Pare
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Scott...
 
Scott Selikoff
author
Saloon Keeper
Posts: 4014
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...with the exception of clob/blobs (since the data contained in them may be huge)... buts a whole nother ball of wax.
[ July 17, 2006: Message edited by: Scott Selikoff ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic