Java Reference
In-Depth Information
The administrator adds ODBC drivers, configures drivers to work with specific database
files, and logs SQL use. Figure 18.1 shows the ODBC Data Source Administrator on a
Windows system.
FIGURE 18.1
The ODBC Data
Source Admin-
istrator on a
Windows XP
system.
In Figure 18.1, the Drivers tab of the ODBC Data Source Administrator dialog box lists
all the ODBC drivers present on the system. Many of the drivers are specific to a data-
base company's format, such as the Microsoft Access Driver.
The JDBC-ODBC bridge allows JDBC drivers to be used as ODBC drivers by convert-
ing JDBC method calls into ODBC function calls.
Using the JDBC-ODBC bridge requires three things:
The JDBC-ODBC bridge driver included with Java: sun.jdbc.odbc.
JdbcOdbcDriver
n
An ODBC driver
n
An ODBC data source that has been associated with the driver using software such
as the ODBC Data Source Administrator
n
ODBC data sources can be set up from within some database programs. For example,
when a new database file is created in Lotus Approach, users have the option of associat-
ing it with an ODBC driver.
All ODBC data sources must be given short, descriptive names. The name is used inside
Java programs when a connection is made to the database that the source refers to.
On a Windows system, after an ODBC driver is selected and the database is created, they
show up in the ODBC Data Source Administrator. Figure 18.2 shows an example of this
for a data source named WorldEnergy .
Search WWH ::




Custom Search