Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ResultSet

 
gopal kishan
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
can we use same resultset and statement object to execute multiple query.
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No you have to close the statement and create a new statement object.
But the same connection object can be used to create more than one statement.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by gopal kishan:
can we use same resultset and statement object to execute multiple query.


Read the docs. There is no other better substitute.

Doc says:
"A ResultSet object is automatically closed when the Statement object that generated it is closed, re-executed, or used to retrieve the next result from a sequence of multiple results."
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic