aspose file tools*
The moose likes JDBC and the fly likes prepared statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "prepared statement" Watch "prepared statement" New topic
Author

prepared statement

Rambabu Gonela
Greenhorn

Joined: Jul 31, 2006
Posts: 24
Hello..

prepared statement in jdbc means its precompiled statement.. ok..i have one doubt .. where it will compile? in java compiler or any other compiler.. and where it will store after compilation
Srikanth Ramu
Ranch Hand

Joined: Feb 20, 2007
Posts: 76
PreparedStatement is an interface and it varys from one Driver to another driver implementation. However mostly the SQLs are compiled in the Database.
Jeff Ash
Greenhorn

Joined: Apr 07, 2007
Posts: 11
Compile is probably not the best term when speaking of PreparedStatement. Basically, the database parses the SQL and gets the statement ready for execution. When you change bound parameter values in a PreparedStatement, the database does not need to reparse the SQL and prepare for execution, it can simply update a few variables and then it's ready to go.

Think of it as more of a caching mechanism.


Jeff Ash<br /><a href="http://www.excellentiasoftware.com" target="_blank" rel="nofollow">Excellentia Software</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: prepared statement
 
Similar Threads
prepared statement....
Prepared Statement vs statement
prepared statement
what is better
Create DB2 database