The following table lists Open Client/Server type constants, their corresponding C datatypes, and their corresponding Adaptive Server datatypes, if any:
Type category |
Open Client/Server type constant |
Description |
Corresponding C datatype |
Corresponding server datatype |
---|---|---|---|---|
Binary types |
CS_BINARY_TYPE |
Binary type |
CS_BINARY |
binary, varbinary |
CS_LONGBINARY_TYPE |
Long binary type |
CS_LONGBINARY |
None |
|
CS_VARBINARY_TYPE |
Variable-length binary type |
CS_VARBINARY |
None |
|
Bit types |
CS_BIT_TYPE |
Bit type |
CS_BIT |
bit |
Character types |
CS_CHAR_TYPE |
Character type |
CS_CHAR |
char, varchar |
CS_LONGCHAR_TYPE |
Long character type |
CS_LONGCHAR |
None |
|
CS_VARCHAR_TYPE |
Variable-length character type |
CS_VARCHAR |
None |
|
CS_UNICHAR_TYPE |
Fixed-length or variable-length character type |
CS_UNICHAR |
unichar univarchar |
|
Datetime types |
CS_DATE_TYPE |
4-byte date type |
CS_DATE |
date |
CS_TIME_TYPE |
4-byte time type |
CS_TIME |
time |
|
CS_DATETIME_TYPE |
8-byte datetime type |
CS_DATETIME |
datetime |
|
CS_DATETIME4_TYPE |
4-byte datetime type |
CS_DATETIME4 |
smalldatetime |
|
Numeric types |
CS_TINYINT_TYPE |
1-byte unsigned integer type |
CS_TINYINT |
tinyint |
CS_SMALLINT_TYPE |
2-byte integer type |
CS_SMALLINT |
smallint |
|
CS_INT_TYPE |
4-byte integer type |
CS_INT |
int |
|
CS_DECIMAL_TYPE |
Decimal type |
CS_DECIMAL |
decimal |
|
CS_NUMERIC_TYPE |
Numeric type |
CS_NUMERIC |
numeric |
|
CS_FLOAT_TYPE |
8-byte float type |
CS_FLOAT |
float |
|
CS_REAL_TYPE |
4-byte float type |
CS_REAL |
real |
|
Money types |
CS_MONEY_TYPE |
8-byte money type |
CS_MONEY |
money |
CS_MONEY4_TYPE |
4-byte money type |
CS_MONEY4 |
smallmoney |
|
Text and image types |
CS_TEXT_TYPE |
Text type |
CS_TEXT |
text |
CS_IMAGE_TYPE |
Image type |
CS_IMAGE |
image |