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 preparedstatements Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "preparedstatements" Watch "preparedstatements" New topic
Author

preparedstatements

vara prakash
Greenhorn

Joined: Mar 31, 2005
Posts: 7
when we create the prepared statement, is the precompiled sql statement is getting saved at the database server side or at the JVM side. Could someone explain clearly what is happening under the covers.

TIA
Vara Prakash
Sripathi Krishnamurthy
Ranch Hand

Joined: Mar 07, 2005
Posts: 232
http://tada.percussion.com/web/knowbase.nsf/0/5497e0fddad8b90d85256b45005a8853?OpenDocument

check this out.
vara prakash
Greenhorn

Joined: Mar 31, 2005
Posts: 7
Hi,
Thanks for reply but I could n't find the information I m looking for. Could you just explain me in detail.

Thanks in advance.
Vara Prakash
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

You'll find a number of conversations if you search this forum, but basically the PreparedStatement should be cached in the database - or rather the database compiles the statement into database specific code and holds that. Some databases don't support PreparedStatements and the Driver fakes support, so in this case it is like caching in the JVM, but there isn't much benefit in this case except in the 'convenience' aspects PreparedStatements provide.

Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: preparedstatements
 
Similar Threads
prepared statement....
WA #1.....word association
Oracle JDBC error
about multibutton submit
How to Submit form on load event of body/window