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 Not clear about PreparedStatement Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JDBC
Reply 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: 1503
Yes, you are correct regarding prepared statements.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
jQuery in Action, 2nd edition
 
subject: Not clear about PreparedStatement
 
Threads others viewed
Prepared Statements
statement Vs prepared statement for ordinary select queries
What exactly we mean by Precompiled SQL Statement
Queries regarding PreparedStatement
PreparedStatement
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture