aspose file tools*
The moose likes JDBC and the fly likes doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "doubt" Watch "doubt" New topic
Author

doubt

Maya Pillai
Ranch Hand

Joined: Jul 17, 2008
Posts: 60
Can I reuse a Statement/Prepared Statement or must I create a new one for each query?

Please help
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

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.


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38902
    
  23
Please don't use thread titles like "doubt;" people like to know what the thread is about.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doubt