Field types
c-treeDB, c-treeDB.NET, and c-treeVCL support all original c-treeACE field types and includes redefinition for new field types. For compatibility reasons, the original c-tree Plus field types can be used, but FairCom suggests using the new field types.
Note that these do not represent new field types, however, substitute a new name of existing c-treeACE field types. The new naming convention is used within the c-treeACE SQL product line, and offers a better description of the fields.
There is absolutely no difference in using any of the definitions, however, for future compatibility and better program reading, the new field types offer an improved path.
c-treeDB Field Type
|
c-treeACE Field Type
|
Equivalent Data Type
|
Implementation
|
CT_BOOL
|
CT_BOOL
|
CTBOOL
|
One byte Boolean
|
CT_TINYINT
|
CT_CHAR
|
CTSIGNED
|
Signed one byte integer.
|
CT_UTINYINT
|
CT_CHARU
|
CTUNSIGNED
|
Unsigned one byte integer.
|
CT_SMALLINT
|
CT_INT2
|
CTSIGNED
|
Signed two-byte integer.
|
CT_USMALLINT
|
CT_INT2U
|
CTUNSIGNED
|
Unsigned two-byte integer.
|
CT_INTEGER
|
CT_INT4
|
CTSIGNED
|
Signed four-byte integer.
|
CT_UINTEGER
|
CT_INT4U
|
CTUNSIGNED
|
Unsigned four-byte integer.
|
CT_MONEY
|
CT_MONEY
|
CTMONEY
|
Signed four-byte integer interpreted as number of pennies (two fixed decimal places)
|
CT_DATE
|
CT_DATE
|
CTDATE
|
Unsigned four-byte integer interpreted as date.
|
CT_TIME
|
CT_TIME
|
CTTIME
|
Unsigned four-byte integer interpreted as time.
|
CT_FLOAT
|
CT_SFLOAT
|
CTFLOAT
|
Four-byte floating point.
|
CT_DOUBLE
|
CT_DFLOAT
|
CTFLOAT
|
Eight-byte floating point.
|
CT_TIMESTAMP
|
CT_TIMES
|
CTDATETIME
|
Time stamp.
|
CT_EFLOAT
|
CT_EFLOAT
|
CTFLOAT
|
Extended precision floating point (not supported as a key segment).
|
CT_BINARY
|
CT_F2STRING (CT_ARRAY*)
|
pTEXT, pUTEXT
|
Arbitrary fixed length data. Fixed length binary data
|
CT_CHARS
|
CT_FSTRING
|
pTEXT
|
Fixed length delimited data. Fixed length string data
|
CT_FPSTRING
|
CT_FPSTRING
|
pTEXT
|
Fixed length data with 1-byte length count
|
CT_F2STRING
|
CT_F2STRING
|
pTEXT
|
Fixed length data with 2-byte length count
|
CT_F4STRING
|
CT_F4STRING
|
pTEXT
|
Fixed length data with 4-byte length count
|
CT_BIGINT
|
CT_BIGINT
|
CTBIGINT
|
Eight-byte signed integer
|
CT_NUMBER
|
CT_NUMBER
|
CTNUMBER
|
Scaled BCD number
|
CT_CURRENCY
|
CT_CURRENCY
|
CTCURRENCY
|
Eight-byte signed integer interpreted as currency value with four fixed decimal digits.
|
CT_PSTRING
|
CT_PSTRING
|
pTEXT
|
Varying length field data with 1-byte length count.
|
CT_VARBINARY
|
CT_2STRING
|
pTEXT
|
Varying length field data with 2-byte length count. Variable length binary data of up to 65535 bytes.
|
CT_LVB
|
CT_4STRING
|
pTEXT
|
Varying length field data with 4-byte length count. Variable length binary data of up to 4294967295 bytes.
|
CT_VARCHAR or CT_LVC
|
CT_STRING
|
pTEXT
|
Varying length field delimited data. Variable length string data.
|
*CT_BINARY field type was changed in c-treeACE V9 to CT_F2STRING.
All the c-treeDB.NET field types are defined using the FIELD_TYPE enum.
c-treeDB.NET Field Type
|
BOOL
|
TINYINT
|
UTINYINT
|
SMALLINT
|
USMALLINT
|
INTEGER
|
UINTEGER
|
MONEY
|
DATE
|
TIME
|
FLOAT
|
DOUBLE
|
TIMESTAMP
|
EFLOAT
|
BINARY
|
CHARS
|
FPSTRING
|
F2STRING
|
F4STRING
|
BIGINT
|
NUMBER
|
CURRENCY
|
PSTRING
|
VARBINARY
|
LVB
|
VARCHAR/LVC
|
|