Using JDBC to Create Database Objects
By James W. Cooper2003-05-24
Registering Your Database with ODBC
Before you can access an ODBC database under Windows 95 or NT, you must register it with the ODBC driver control panel. Under Windows 95, this is the ODBC icon in the Control Panel program. Under Windows NT, you will find the program on the Start menu. (If you don't, you will need to install the ODBC driver WX1350.exe we described above.)
Double-click on the ODBC icon and then click on Add as shown in Figure 1. Then select a database driver (here use Microsoft Access) and click on OK. Type in a Data Source name (Grocery prices) and a Description (in local stores) for the database (neither of these need be related to the filename), and then click on Select to locate the database and select it. After locating the database, your screen will appear as shown in Figure 2. Click on OK and then on Close to close the panels.
Figure 1: The ODBC control panel setup screen
Figure 2: Selecting a database and description in the ODBC control panel
Tutorial Pages:
» What is a Database?
» Getting Data out of Databases
» Kinds of Databases
» ODBC
» What Is JDBC?
» Installing and Using JDBC
» Types of JDBC Drivers
» Two-Tier and Three-Tier Models
» Writing JDBC Code to Access Databases
» Registering Your Database with ODBC
» Connecting to a Database
» Accessing the Database
» The ResultSet
» ResultSetMetaData
» DatabaseMetaData
» Getting Information on Tables
» Executing SQL Queries, Printing out ResultSets, A Simple JDBC Program
» Building Higher Level JDBC Objects
» Building a Database Object, A Visual Database Program
» Executing a Query
» The Query Result Dialog
» Example Files
» Summary
First published by IBM DeveloperWorks
