Obtaining driver version information
About this task
There are two ways to obtain version information about HCL 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
- Import the Informix® package com.informix.jdbc.* into
your Java™ program by adding
the following line to the import section:
import com.informix.jdbc.*; - Invoke the static method IfxDriver.getJDBCVersion().
This method returns a String object that contains the complete version of the current HCL Informix® JDBC Driver.
An example of a version of HCL 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 HCL 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 HCL 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.VersionThe command also returns the serial number you provided when you installed the driver.