DB2 Datatype | DB2 SQL Datatype1 | RWDBValue:: ValueType | C++ Datatype |
---|---|---|---|
CHAR VARCHAR LONG VARCHAR CLOB | SQL_CHAR SQL_VARCHAR SQL_LONGVARCHAR SQL_CLOB | String or UString | |
CHAR FOR BIT DATA VARCHAR FOR BIT DATA LONGVARCHAR FOR BIT DATA BLOB | SQL_BINARY SQL_VARBINARY SQL_LONGVARBINARY SQL_BLOB | Blob | |
SMALLINT | SQL_SMALLINT | Short | short int |
BIGINT | SQL_BIGINT | LongLong | long long |
INTEGER | SQL_INTEGER | Long | long int |
DOUBLE FLOAT | SQL_DOUBLE SQL_FLOAT | Double | double |
REAL | SQL_REAL | Float | float |
DATE | SQL_TYPE_DATE | Date | |
NUMERIC DECIMAL | SQL_NUMERIC SQL_DECIMAL | Decimal | |
SQL_TYPE_TIMESTAMP SQL_TYPE_TIME | DateTime | ||
SQL_GRAPHIC SQL_VARGRAPHIC SQL_LONGVARGRAPHIC SQL_WCHAR SQL_WVARCHAR SQL_WLONGVARCHAR | WString | ||
DECFLOAT | SQL_DECFLOAT | Decimal |
RWDBValue:: ValueType | DB2 Datatype |
---|---|
Char UnsignedChar | SMALLINT |
String UString | If 0 < length < 255, VARCHAR using the storageLength of the RWDBColumn If length > 32700, CLOB using the storageLength of the RWDBColumn, Else LONG VARCHAR |
WString MBString | Not supported |
Blob | If 0 < length < 255 VARCHAR FOR BIT DATA using the storageLength of the RWDBColumn If length > 32700, BLOB using the storageLength of the RWDBColumn Else LONG VARCHAR FOR BIT DATA |
Short UnsignedShort | SMALLINT |
Int UnsignedInt | INTEGER |
Long UnsignedLong | INTEGER |
LongLong UnsignedLongLong | BIGINT |
Float | REAL |
Double | DOUBLE |
LongDouble | Not supported |
Decimal | DECIMAL using the precision and scale of the RWDBColumn, if supplied |
Date | DATE |
DateTime | TIMESTAMP |
TimeTuple | Not supported |
TimeTupleOffset | Not supported |
Duration | Not supported |