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 HCL OneDB™ 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 HCL OneDB 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, HCL OneDB JDBC Driver does not have access to the column information. In those cases, unless you use the HCL OneDB extensions, the driver maps those columns using the corresponding HCL OneDB data types listed in the first table in Data type mapping between HCL OneDB 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.