This table shows the equivalent names for field types in various APIs. All APIs are ultimately resolved to a c.isam Field type. Higher-level API's generally have less flexibility in selecting the underlying type. For example, creating a SQL MONEY field will never result in a c.isam CT_MONEY, while a c.isam CT_MONEY field imported to SQL would be represented as the SQL MONEY type. This table is intended to show compatible data types rather than express the exact mappings that are in effect.
c.nav field type |
c.isam field type |
Csharp.nav Field Type |
Python.nav Field Type |
SQL and json.db Field Type |
Implementation |
CT_BOOL |
CT_BOOL |
BOOL |
BOOLEAN |
BIT |
One-byte Boolean |
CT_TINYINT |
CT_CHAR |
TINYINT |
CT_TINYINT |
TINYINT |
Signed one-byte integer. |
CT_UTINYINT |
CT_CHARU |
UTINYINT |
CT_UTINYINT |
|
Unsigned one-byte integer. |
CT_SMALLINT |
CT_INT2 |
SMALLINT |
CT_SMALLINT |
SMALLINT |
Signed two-byte integer. |
CT_USMALLINT |
CT_INT2U |
USMALLINT |
CT_USMALLINT |
|
Unsigned two-byte integer. |
CT_INTEGER |
CT_INT4 |
INTEGER |
CT_INTEGER |
INTEGER |
Signed four-byte integer. |
CT_UINTEGER |
CT_INT4U |
UINTEGER |
CT_UINTEGER |
|
Unsigned four-byte integer. |
CT_MONEY |
CT_MONEY |
MONEY |
MONEY |
MONEY* |
Signed four-byte integer interpreted as number of pennies (two fixed decimal places) up to a precision of 9. |
CT_DATE |
CT_DATE |
DATE |
DATE |
DATE |
Unsigned four-byte integer interpreted as date. No time information. |
CT_TIME |
CT_TIME |
TIME |
TIME |
TIME* |
Unsigned four-byte integer interpreted as time with whole second precision. No date information. This data type does not support millisecond precision. CTTIMEMS functions are recommended for millisecond precision. |
CT_TIME_MS |
CT_TIME_MS |
TIME_MS |
|
TIME |
Similar to CTTIME but with millisecond precision. |
CT_FLOAT |
CT_SFLOAT |
FLOAT |
CT_FLOAT |
REAL |
Four-byte floating point. |
CT_DOUBLE |
CT_DFLOAT |
DOUBLE |
CT_DOUBLE |
DOUBLE FLOAT |
Eight-byte floating point. |
CT_TIMESTAMP |
CT_TIMES |
TIMESTAMP |
TIMESTAMP CT_TIMESTAMP |
TIMESTAMP* |
Time stamp including date and time without millisecond precision. |
CT_TIMES_MS |
CT_TIMES_MS |
TIMESTAMP_MS |
|
TIMESTAMP |
Time stamp including date and time with millisecond precision. |
CT_EFLOAT |
CT_EFLOAT |
EFLOAT |
|
|
Extended precision floating point (not supported as a key segment). |
CT_ARRAY |
CT_ARRAY |
BINARY |
BINARY_FIXED_LENGTH |
BINARY* |
Fixed-length binary data. |
CT_BINARY |
CT_F2STRING |
BINARY F2STRING |
|
BINARY CHAR* |
Fixed width data using 2 byte length and zero padded to width. binary data. 64-kilobytes maximum length. |
CT_CHARS |
CT_FSTRING |
CHARS |
CT_CHARS STRING_FIXED_LENGTH |
CHAR BINARY* |
Fixed-length binary data. 64-kilobytes maximum length. |
CT_FPSTRING |
CT_FPSTRING |
FPSTRING |
|
BINARY* CHAR* |
Fixed-length binary data with 1-byte length count. 255-bytes maximum length.Zero padded to width. |
CT_F4STRING |
CT_F4STRING |
F4STRING |
|
BINARY* CHAR* |
Fixed-length data with 4-byte length count and zero padded to width. |
CT_BIGINT |
CT_INT8 |
BIGINT |
CT_BIGINT |
BIGINT |
Eight-byte signed integer. |
CT_UBIGINT |
CT_INT8U |
|
CT_UBIGINT |
|
Eight-byte unsigned integer. |
CT_NUMBER |
CT_NUMBER |
NUMBER |
DECIMAL |
NUMERIC MONEY DECIMAL |
Scaled BCD number. |
CT_CURRENCY |
CT_CURRENCY |
CURRENCY |
CURRENCY |
MONEY |
Eight-byte signed integer interpreted as currency value with four fixed decimal digits. |
CT_PSTRING |
CT_PSTRING |
PSTRING |
|
VARCHAR* VARBINARY* |
Varying length field data with 1-byte length count. |
CT_VARBINARY |
CT_2STRING |
VARBINARY |
|
VARBINARY VARCHAR |
Varying length field data with 2-byte length count. Variable length binary data of up to 65535 bytes.
|
CT_LVB |
CT_4STRING |
LVB |
CT_LVB STRING |
LVARBINARY LVARCHAR |
Varying length field data with 4-byte length count. Variable length binary data of up to 4294967295 bytes. |
CT_VARCHAR CT_LVC |
CT_STRING |
VARCHAR LVC |
|
VARCHAR* LVARCHAR* |
Varying length null delimited data. Variable length string data. |
CT_NCHAR |
CT_F2UNICODE |
|
|
NCHAR |
Fixed-length UNICODE char data. |
CT_NVARCHAR |
CT_2UNICODE |
|
|
NVARCHAR |
Variable-length UNICODE char data. |
* Indicates types that are partially or fully compatible but non-typical in V13.