Using JDBC to Create Database Objects
By James W. Cooper2003-05-24
Installing and Using JDBC
The JDBC classes are grouped in the java.sql package and are installed when you install the Java JDK 1.1 or later. However, if you want to use the JDBC-ODBC bridge, you must install two other packages. First, if you are using Windows 95, you must upgrade your ODBC driver to the 32-bit driver, which you can download free from Microsoft's Web site. This driver is difficult to find on their site; search for DataAcc.exe and download and install it.
The JDBC-ODBC Driver is available from the Sun Java site (http://java.sun.com) and is easily located and downloaded. After you expand and install this driver, you must do the following:
- Add the \jdbc-odbc\classes; path to your PATH environment variable.
- Add the \jdbc-odbc\classes; path to your CLASSPATH environment variable.
- Under Windows 95, put these into your autoexec.bat file and reboot so they take effect for all tasks.
- Under Windows NT, add these to your Environment tab of your System object in the Control panel, and log off and on again for them to take effect.
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
