O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The PreparedStatement

The PreparedStatement provides a certain degree of convenience for the Java database developer. Once a SQL statement has been prepared, its object representation becomes the PreparedStatement object. The parameters of the query can be changed not by restating the query, but by making method calls on the PreparedStatement object.

If the full range of queries to be presented to an application are known when the application is being developed, and the range of queries is limited and manageable, then it may make very good sense to use the PreparedStatement class to develop the application.

If all of the queries an application may need to run are known beforehand and the number of queries is limited, then it probably makes sense ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required