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

doubt

 
Maya Pillai
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I reuse a Statement/Prepared Statement or must I create a new one for each query?

Please help
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maya Pillai wrote:Can I reuse a Statement/Prepared Statement or must I create a new one for each query?

Please help


Yes you can OR you can try with a small program to ensure it.. I used it with one precautions while using PreparedStatement, which is clear all the parameters before assigning it different query.
 
Campbell Ritchie
Sheriff
Pie
Posts: 48949
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't use thread titles like "doubt;" people like to know what the thread is about.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic