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

Seat Pricing

Clicking the Seat Pricing button returns a tabular display of current seat prices at the YMLD Theater (see Figure 11-8).

Figure 11-8. Current seat prices

The logic for retrieving the seat prices is identical to the logic for retrieving the current productions at the theater.

Statement s = conn.createStatement();
ResultSet rs = s.executeQuery( "SELECT * FROM PRICEPLAN");
while (rs.next()) {
  Object row = create("row");
  for (int  i = 1; i < 3; ++i) {
    Object cell = create("cell");
    setString(cell,"text",rs.getString(i));
    add(row,cell);
  }
  Object tablep = find(panel,"PriceTable");
  add(tablep,row);
}

In this routine, we are retrieving only ...

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