Obtaining driver version information

About this task

There are two ways to obtain version information about Informix® JDBC Driver: from your Java program or from the UNIX or MS-DOS command prompt.

To get version information from your Java program:

Procedure

  1. Import the Informix® package com.informix.jdbc.* into your Java program by adding the following line to the import section:
    import com.informix.jdbc.*;
  2. Invoke the static method IfxDriver.getJDBCVersion().
    This method returns a String object that contains the complete version of the current Informix® JDBC Driver.

    An example of a version of Informix® JDBC Driver is 2.00.JC1.

    The IfxDriver.getJDBCVersion() method returns only the version, not the serial number you provided during installation of the driver.

Results

Important: For version X.Y of Informix® JDBC Driver, the JDBC API methods Driver.getMajorVersion() and DatabaseMetaData.getDriverMajorVersion() always return the value X. Similarly, the methods Driver.getMinorVersion() and DatabaseMetaData.getDriverMinorVersion() always return the value Y.
To get the version of Informix® JDBC Driver from the command line, enter the following command at the UNIX shell prompt or the Windows command prompt:
java com.informix.jdbc.Version

The command also returns the serial number you provided when you installed the driver.