Retrieve data through the JDBC API by implementing the following three steps:
Obtain a driver and establish a connection to a database.
Send an SQL statement to the database and retrieve data.
Assign the data returned from the database to local variables.
The following sections introduce methods you can use to implement each of the three steps used to retrieve data through the JDBC API while you write an example bean, the DatabaseAccess bean, shown in Listing 14.1.
The DataAccess bean is hard coded to use a JDBC-ODBC Bridge text driver configured with the directory selected containing the database text files. See the previous section, "Setting Up an ODBC Driver," for more information.