Use the ResultSet.getXXX() methods to transfer data from an Informix database to a Java program that uses the JDBC API to connect to an Informix database. For example, use the ResultSet.getString() method to get the data stored in a column of data type LVARCHAR.
The following table lists the ResultSet.getXXX() methods that IBM Informix JDBC Driver supports for nonextended data types. The top heading lists the standard JDBC API data types defined in the java.sql.Types class. These translate to specific Informix data types, as shown in the first table in Data Type Mapping Between Informix and JDBC Data Types. The table lists the getXXX() methods you can use to retrieve data of a particular JDBC API data type.
An uppercase and bold X indicates the recommended getXXX() method to use; a lowercase x indicates other getXXX() methods supported by IBM Informix JDBC Driver.
The getXXX() methods return a null value if the retrieved column value is an SQL null value.
The following table lists the ResultSet.getXXX() methods that IBM Informix JDBC Driver supports for the Informix extended data types, the mappings for which are shown in the table on page ***. The table lists the getXXX() methods you can use to retrieve data of a particular extended data type.
An uppercase and bold X indicates the recommended getXXX() method to use; a lowercase x indicates other getXXX() methods supported by IBM Informix JDBC Driver. The table does not include getXXX() methods that you cannot use with any of the Informix extended data types.
getXXX() Method | Informix Extended Data Types | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BOOLEAN | LVARCHAR | Opaque types | BLOB | CLOB | BYTE | TEXT | NAMED ROW | UNNAMED ROW | SET or MULTISET | LIST | |
getByte() | x | x | |||||||||
getShort() | x | ||||||||||
getInt() | x | ||||||||||
getBoolean() | X | ||||||||||
getString() | X | x | x | ||||||||
getBytes() | x | x | |||||||||
getAsciiStream() | x | x | X | ||||||||
getCharacterStream() | x | x | X | ||||||||
getBinaryStream() | x | x | X | ||||||||
getObject() | x | x | X | x | x | x | x | X | X | x | x |
getArray() | x | x | |||||||||
getBlob() | X | ||||||||||
getClob() | X |
The getXXX() methods return a null value if the retrieved column value is an SQL null value.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]