The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
It is best to close the prepared statement. To do anything else can cause resource leaks (having to troubleshoot an Oracle "maximum number of open cursors exceeded" is no fun). As for your first question, that is implementation dependent. The database I know best is Oracle, so I'll talk a bit about that.Originally posted by Vinod John:
When I call close() on prepared statment object will the compiled version of the sql be discarded or the database overrule's this call and still retains it.[... ] (Or) you guy recommend never to close the prepared statement.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |