This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JDBC and the fly likes Prepared Statement Compilation 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 Compilation" Watch "Prepared Statement Compilation" New topic
Author

Prepared Statement Compilation

Josweth Reddy
Ranch Hand

Joined: Nov 02, 2005
Posts: 30
Hai ,
We know that PreparedStatement is a precompiled statement..
But who provides the implementation for the compiled PreparedStatement
I mean as it is in "java.sql" ,Will java compiles and provides the implentation??.

Please clarify...

Thanking you,
Josweth Reddy
stu derby
Ranch Hand

Joined: Dec 15, 2005
Posts: 333
Actually, the PreparedStatement Java object is (usually) not the compiled SQL statement itself. Instead, it contains a handle or reference to the compiled statement that exists within the database itself. The major possible exceptions to this are embedded Java databases (where the PreparedStatement implementation mighthold the compiled SQL statement), and database drivers that don't support true compilation (where PreparedStatement is implemented as a wrapper class around Statement).

It's the driver writer's responsibility to get all this right; you just have to get the right driver for your database.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Prepared Statement Compilation
 
Similar Threads
PreparedStatement caching
Rangarajan Balasubramanian
webapp sql injection
Difference between Statement/Prepared statement?
Update in For loop.