Data type mapping for PreparedStatement.setXXX() extensions
introduces many extended data types. As a result, there can be multiple mappings between a JDBC or Java™ data type and the corresponding Informix® data type.
For example, you can use PreparedStatement.setAsciiStream() to insert into either a text column or a CLOB column. Similarly, you can also use PreparedStatement.setBinaryStream() to insert into a byte column or a BLOB column. Because the actual column information is not available to Informix® JDBC Driver at all times, there can be ambiguity for the driver when it maps data types.
Normally, with INSERT, SELECT, or DELETE statements, the column information is available to the driver, so the driver can determine how the data can be sent to the database server.
However, when the data is referenced in an UPDATE statement or inside a WHERE clause, Informix® JDBC Driver does not have access to the column information. In those cases, unless you use the Informix® extensions, the driver maps those columns using the corresponding Informix® data types listed in the first table in Data type mapping between Informix and JDBC data types. For the PreparedStatement.setAsciiStream() method, the driver tries to map to a text data type, and for the PreparedStatement.setBinaryStream() method, it tries to map to a byte data type.