File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes reuse java.sql.Statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "reuse java.sql.Statement" Watch "reuse java.sql.Statement" New topic
Author

reuse java.sql.Statement

Abhijeet Gholkar
Greenhorn

Joined: Jun 11, 2002
Posts: 25
Hi folks
Can i use same java.sql.Statement object for executing more than one queries at a time. If not please tell me why.
narasimharao konjeti
Ranch Hand

Joined: Apr 26, 2003
Posts: 130
s we can excucute, there is no problem.


"Unwise to sweat petty stuff, wise to pet sweaty stuff."
Dana Hanna
Ranch Hand

Joined: Feb 28, 2003
Posts: 227
If by "at the same time" you mean concurrently from different Threads, I'm going to have to say NO WAY.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: reuse java.sql.Statement
 
Similar Threads
Creating Database
Q: repeatedly execute() on PreparedStatement without close()
Special Character Handling
getFetchSize()
Threads and Waiting for DB connection