Home | Previous Page | Next Page   Connecting to the Database >

In This Chapter

This chapter explains the information you need to use IBM Informix JDBC Driver to connect to an Informix database. The chapter includes the following sections:

You must first establish a connection to an Informix database server or database before you can start sending queries and receiving results in your Java program.

You establish a connection by completing two actions:

  1. Load IBM Informix JDBC Driver.
  2. Create a connection to either a database server or a specific database in one of the following ways:

Using a DataSource object is preferable to using the DriverManager.getConnection method because a DataSource object is portable and allows the details about the underlying data source to be transparent to the application. The target data source implementation can be modified, or the application can be redirected to a different server without affecting the application code.

A DataSource object can also provide support for connection pooling and distributed transactions. In addition, Enterprise Java Beans and J2EE require a DataSource object.

The following additional connection options are available:

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]