July 2001
Beginner to intermediate
368 pages
6h 52m
English
In this case study, the variations in database access occur in the particular implementations of the steps involved. Figure 18-1 illustrates this.

I have created a method called doQuery that handles the query I need to perform. I pass in the name of the database and the query specification. The doQuery method follows the five general steps above, providing virtual methods for the steps (such as formatConnect and formatSelect) that must be implemented differently.
The doQuery method is implemented as follows. As shown in Figure 18-1 ...