View Transaction Log

The transaction log contains records for each ticket that has been purchased. The transaction log can be displayed if you want to see what purchases were made at the theater or if you need to refund a ticket (see Figure 11-18).

Figure 11-18. Transaction log

The routine that populates this screen with data is called pShowTransactions(). This method retrieves all of the purchase transactions and displays them in a table on the screen.

 ResultSet rs = s.executeQuery( "SELECT * FROM TRANSACTIONS WHERE TX_TYPE = 'PURCHASE'"); while (rs.next()) { String txNo = rs.getString("TX_NO"); String txType = rs.getString("TX_TYPE"); String ...

Get Apache Derby—Off to the Races: Includes Details of IBM® Cloudscape™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.