CONNX Data Type | SQL Data Type | Length | ODBC Data Type | Description |
Db2 Eur Date (dd.mm.yyyy) | Date | 10 | SQL_DATE | |
Db2 Eur Time (hh.mm.ss.) | Time | 8 | SQL_TIME | |
Db2 IEEE 4-byte float | Real | 4 | SQL_REAL | 4-byte byte-reversed (little endian) IEEE float |
Db2 IEEE 8-byte float | Double | 8 | SQL_DOUBLE | 8-byte byte-reversed (little endian) IEEE float |
Db2 IEEE Big E 4-byte float | Real | 4 | SQL_REAL | 4-byte big endian IEEE float |
Db2 IEEE Big E 8-byte float | Double | 8 | SQL_DOUBLE | 8-byte big endian IEEE float |
Db2 ISO Date (YYYY-MM-DD) | Date | 10 | SQL_DATE | ISO DATE column |
Db2 ISO Time (hh.mm.ss) | Time | 8 | SQL_TIME | ISO TIME column |
Db2 JIS Date (YYYY-MM-DD) | Date | 10 | SQL_DATE | |
Db2 JIS Time (hh:mm:ss) | Time | 8 | SQL_TIME | |
Db2 Longword Big Endian | Integer | 4 | SQL_INTEGER | |
Db2 Longword Integer | Integer | 4 | SQL_INTEGER | 4-byte signed long integer (-2147483648 thru +2147483647) |
Db2 Mainframe 4-byte float | Real | 4 | SQL_REAL | Mainframe Db2 4-byte float |
Db2 Mainframe 8-byte float | Double | 8 | SQL_DOUBLE | Mainframe Db2 8-byte float |
Db2 Numeric | Numeric | 1-31 | SQL_NUMERIC | Zoned numeric columns defined as NUMERIC (precision, scale), where precision >= scale; 0 <= precision <=31; 0 <= scale <=31 |
Db2 Numeric Integer | Numeric | 9 | SQL_DECIMAL | Describes an SQL NUMERIC display column with a scale = 0 and precision < = 9, e.g., NUMERIC (9,0). The default conversion from host column to ODBC data type is from SQL_NUMERIC to signed long integer = SQL_C_SLONG. |
Db2 Packed Decimal | Decimal | 1-16 | SQL_DECIMAL | Packed decimal columns defined as DECIMAL (precision, scale), where precision >= scale; 0 <= precision <=31; 0 <= scale <=31 |
Db2 Packed Decimal Integer | Decimal | 9 | SQL_DECIMAL | This data type corresponds to an SQL_DECIMAL column with a scale of 0 and a precision < = 9, e.g., DECIMAL(9,0). The default conversion from host column to ODBC data type is from SQL_DECIMAL to signed long integer = SQL_C_SLONG. |
Db2 Small Integer | Smallint | 2 | SQL_SMALLINT | 2-byte signed small integer (-32768 thru +32767) |
Db2 Timestamp | Timestamp | 26 | SQL_TIMESTAMP | ISO Timestamp column (YYYY-MM-DD -HH.MM.SS.123456) |
Db2 Text (Null Terminated) | Varchar | 255-32767 | SQL_VARCHAR | 255+ byte variable-length binary (defined as VARCHAR/LONG VARCHAR) |
Db2 Text (Right Space Padded) | Char | 1-254 | SQL_CHAR | 1- to 254-byte fixed-length character |
Db2 USA Date (mm/dd/yyyy) | Date | 10 | SQL_DATE | |
Db2 USA Time (hh:mm xM) | Time | 8 | SQL_TIME | |
Db2 Varbinary | Varbinary | 255-32767 | SQL_VARBINARY | 255+ byte variable-length binary (defined as VARCHAR/LONG VARCHAR FOR BIT DATA) |
Db2 Word Big Endian | SmallInt | 2 | SQL_SMALLINT | |
Double Prec float (Mainframe) | Double | 8 | SQL_DOUBLE | |
Longword 4 bytes | Integer | 4 | SQL_INTEGER | |
Longword (BE) -> Double | Double | 4 | SQL_DOUBLE | |
Longword (BE) -> Decimal | Decimal | 4 | SQL_DECIMAL | |
Single Prec float (Mainframe) | Real | 4 | SQL_REAL | |
Text (Right Space Padded) | Char | -1 | SQL_CHAR | |
Text Db2 (Right Space Padded) | Char | -1 | SQL_CHAR | |
Text Db2 (Null Terminated) | VarChar | -1 | SQL_VARCHAR | |
Unsigned Long (BE) -> Decimal | Decimal | 2 | SQL_DECIMAL | |
Unsigned Word (BE) -> Decimal | Decimal | 2 | SQL_DECIMAL | |
Unsigned Long (BE) -> Double | Double | 4 | SQL_DOUBLE | |
Unsigned Word (BE) -> Double | Double | 2 | SQL_DOUBLE | |
Word 2 bytes | SmallInt | 2 | SQL_SMALLINT | |
Word (BE) -> Decimal | Decimal | 2 | SQL_DECIMAL | |
Word (BE) -> Double | Double | 2 | SQL_DOUBLE |