Java Reference
In-Depth Information
The changes to the Password class now are complete, and objects created
from this class can be serialized and made persistent. Because this project will
use a Microsoft Access database for persistence, prior to creating the database
tables, the database itself must be created and identified as a data source accessi-
ble through a special software driver.
Registering an ODBC Data Source Name
Access comes with special driver software called ODBC (Microsoft's Open
Database Connectivity) that allows programs to make method calls, similar to
the JDBC API. The ODBC driver is necessary in order to interact with the DBMS
software, referred to as the database engine , for a Microsoft Access database. At
one time, this was standard for database access, and all major database vendors
also had ODBC drivers for their products.
To use ODBC to interact with a database, the database must be registered as
an ODBC data source name. A data source name is the name used instead of
the actual database name when establishing a connection to the database. Once
an ODBC data source name is created, it can be registered with an existing data-
base, or a new database with no tables can be created and simultaneously regis-
tered with the data source name. Registering a database with ODBC is done
through the Control Panel in Windows and is independent of Java, your Java
programs, and the JDBC API.
The following steps register a new ODBC data source name.
To Register an ODBC Data Source Name
1. Click the Start button on the Windows taskbar and then point to
Control Panel on the Start menu.
Windows displays
the Start menu and
highlights Control
Panel on the Start
menu (Figure 11-8).
Your menu options
may differ.
Start
menu
Control Panel
command
Start
button
FIGURE 11-8
(continued)
 
Search WWH ::




Custom Search