wood burning stoves 2.0*
The moose likes JDBC and the fly likes Not clear about PreparedStatement 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 "Not clear about PreparedStatement" Watch "Not clear about PreparedStatement" New topic
Author

Not clear about PreparedStatement

jayram
Ranch Hand

Joined: Oct 30, 2000
Posts: 94
Can anyone please clarify whats exact difference between a Statement and a PreparedStatement?? From what i can understand Statements are parsed and compiled every time it is executed while PreparedStatement is precompiled. Does that mean that if same querry is executed by multiple clients at different instances of time and if it is executed using PreparedStatement it will not be parse compiled for each client request?? Is this a guranteed behaviour across different JDBC drivers and databases??
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Yes, you are correct regarding prepared statements.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
Don't get me started about those stupid light bulbs.
 
subject: Not clear about PreparedStatement
 
Similar Threads
What exactly we mean by Precompiled SQL Statement
statement Vs prepared statement for ordinary select queries
PreparedStatement
Prepared Statements
Queries regarding PreparedStatement