Java Reference
In-Depth Information
FIGURE 18.2
A listing of data
sources in the
ODBC Data
Sources
Administrator.
The data source WorldEnergy is associated with a Microsoft Access driver, according to
Figure 18.2.
Most Windows database programs include one or more ODBC dri-
vers that correspond to the format. Microsoft Access includes
ODBC drivers that can be used to connect to an Access database
file.
NOTE
18
Connecting to an ODBC Data Source
Your first project today is a Java application that uses a JDBC-ODBC bridge to connect
to an Access file.
The Access file for this project is world20.mdb , a database of world energy statistics
published by the U.S. Energy Information Administration. The Coal table in this data-
base includes three fields you will be using in the project:
Country
n
Year
n
Anthracite Production
n
The database used in this project is included on this topic's official website at http://
www.java21days.com.
To use this database, you must have an ODBC driver on your system that supports
Access files. Using the ODBC Data Source Administrator (or a similar program if you're
on a non-Windows system), you must create a new ODBC data source associated with
world20.mdb .
Search WWH ::




Custom Search