iAnywhere Solutions ODBC Drivers
iAnywhere Solutions ODBC Driver for DB2
The following table shows how the DB2 data types map to the standard ODBC data types.
| DB2 | ODBC |
|---|---|
| Bigint1 | SQL_BIGINT |
| Blob2 | SQL_LONGVARBINARY |
| Char | SQL_CHAR |
| Char() for Bit Data | SQL_BINARY |
| CLOB3 | SQL_LONGVARCHAR |
| Date | SQL_TYPE_DATE |
| Decimal | SQL_DECIMAL |
| Float | SQL_DOUBLE |
| Integer | SQL_INTEGER |
| Long Varchar | SQL_LONGVARCHAR |
| Long Varchar for Bit Data | SQL_LONGVARBINARY |
| Smallint | SQL_SMALLINT |
| Time | SQL_TYPE_TIME |
| Timestamp | SQL_TYPE_TIMESTAMP |
| Varchar | SQL_VARCHAR |
| Varchar() for Bit Data | SQL_VARBINARY |
1 - Supported on DB2 Universal Database 8.1.
2 - Supported on DB2 Universal Database 8.1.
3 - On DB2 Universal Database versions previous to 8.1, only the first 32Kb of the Clob data type are returned when fetching, and only 32Kb can be inserted and updated.