ODBC Datatype | RWDBValue::ValueType | C++ Datatype |
---|---|---|
SQL_NUMERIC SQL_DECIMAL | Decimal | |
SQL_BINARY SQL_VARBINARY SQL_LONGVARBINARY | Blob | |
SQL_BIT | UnsignedChar | unsigned char |
SQL_DOUBLE SQL_FLOAT | Double | double |
SQL_INTEGER | Long/UnsignedLong (32-bit architectures) Int/UnsignedInt (64-bit architectures) | long int / unsigned long int (32-bit architectures) int / unsigned int (64-bit architectures) |
SQL_INTERVAL | Duration | |
SQL_LONGVARCHAR SQL_VARCHAR SQL_CHAR | String | |
SQL_REAL | Float | float |
SQL_SMALLINT | Short UnsignedShort | short int unsigned short int |
SQL_TYPE_DATE | Date | |
DateTime | ||
SQL_WLONGVARCHAR SQL_WVARCHAR SQL_WCHAR | WString | |
SQL_BIGINT | LongLong UnsignedLongLong | long long unsigned long long |
RWDBValue::ValueType | Possible ODBC Datatypes: the type chosen is the first type supported by the underlying driver |
---|---|
Blob | If 0 < length <= 255, {SQL_VARBINARY, SQL_BINARY, SQL_LONGVARBINARY, SQL_LONGVARCHAR} using the storageLength of the RWDBColumn if applicable; otherwise, {SQL_LONGVARBINARY,SQL_VARBINARY,SQL_BINARY, SQL_LONGVARCHAR} using the storageLength of the RWDBColumn if applicable |
Char, UnsignedChar | {SQL_TINYINT, SQL_SMALLINT, SQL_INTEGER, SQL_DECIMAL, SQL_NUMERIC} |
Date | {SQL_TYPE_DATE, SQL_TYPE_TIMESTAMP} |
DateTime | {SQL_TYPE_TIMESTAMP, SQL_TYPE_DATE} |
Decimal | {SQL_DECIMAL, SQL_NUMERIC, SQL_DOUBLE}, using the precision and scale of the RWDBColumn if applicable |
Double | {SQL_DOUBLE, SQL_FLOAT, SQL_DECIMAL, SQL_NUMERIC } |
Duration | {SQL_INTERVAL_SECOND} |
Float | {SQL_REAL, SQL_DOUBLE, SQL_FLOAT, SQL_DECIMAL, SQL_NUMERIC} using the precision and scale of the RWDBColumn if applicable |
Int, UnsignedInt | {SQL_SMALLINT, SQL_INTEGER, SQL_REAL, SQL_DOUBLE, SQL_FLOAT, SQL_DECIMAL, SQL_NUMERIC} |
Long, UnsignedLong | {SQL_INTEGER, SQL_REAL, SQL_DOUBLE, SQL_FLOAT, SQL_DECIMAL, SQL_NUMERIC} |
LongLong, UnsignedLongLong | {SQL_BIGINT, SQL_DECIMAL, SQL_REAL}1 |
Short, UnsignedShort | {SQL_SMALLINT, SQL_INTEGER, SQL_REAL, SQL_DOUBLE, SQL_FLOAT, SQL_DECIMAL, SQL_NUMERIC} |
String | If 0 < length <= 255,{SQL_VARCHAR, SQL_CHAR, SQL_LONGVARCHAR}; otherwise, {SQL_LONGVARCHAR, SQL_VARCHAR, SQL_CHAR} using the storageLength of the RWDBColumn, if applicable. |
WString UString | If 0 < length <= 254, {SQL_WVARCHAR, SQL_WCHAR, SQL_WLONGVARCHAR} using the storageLength of the RWDBColumn if applicable; otherwise, {SQL_WLONGVARCHAR,SQL_WVARCHAR, SQL_WCHAR} using the storageLength of the RWDBColumn if applicable. |