O'Reilly logo

Apache Derby—Off to the Races: Includes Details of IBM® Cloudscape™ by Dan Scott, George Baklarz, Paul C. Zikopoulos

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

Allocating Statements

After successfully loading a driver and connecting to the database, the application can begin issuing some dynamic SQL statements.

Dynamic SQL statements are those statements that your application builds and executes at runtime. These statements are built and typically only used once. The application builds the SQL statement as a series of strings and then submits the statement for processing.

The first step in executing dynamic SQL is to allocate a statement. In other programming environments, this is sometimes referred to as getting a statement handle. This statement will be used for executing the SQL statements.

 Connection conn = null; Statement stmt = null; conn = DriverManager.getConnection("jdbc:derby:YMLD"); stmt ...

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