ASCII text < 254 characters long in dBASE. Character fields can
be up to 32 KB long (in Clipper and FoxPro) using decimal count as high
byte in field length. It's possible to use up to 64KB long fields by reading
length as unsigned.
Only fields <= 100 characters can be indexed.
|N||Number||<18||ASCII text up till 18 characters long (include sign and decimal point). Valid characters: "0" - "9" and "-". Number fields can be up to 20 characters long in FoxPro and Clipper.|
|L||Logical||1||Boolean/byte (8 bit) Legal values:
|D||Date||8||Date in format YYYYMMDD. A date like 0000-00- 00 is *NOT* valid.|
|M||Memo||10||Pointer to ASCII text field in memo file 10 digits representing a pointer to a DBT block (default is blanks).|
|F||Floating point||20||(dBASE IV and later, FoxPro, Clipper) 20 digits|
|N/A||Character name variable||< 254||1-254 characters (64 KB in FoxBase and Clipper)|
(dBASE V) Like Memo fields, but not for text processing.
(FoxPro/FoxBase) Double integer *NOT* a memo field
|G||General||??||(dBASE V: like Memo) OLE Objects in MS Windows versions|
|P||Picture||??||(FoxPro) Like Memo fields, but not for text processing.|
|I||Integer||4 byte little endian integer||(FoxPro)|
There are weakly-typed and strongly-typed VariFields.
Weakly-typed VariFields allow to store a portion of any character data in the .DBF field itself, with any additional amount, if any, being automatically stored in the MEMO file. This substantially reduces the amount of disk space required to store the data. This is sort of a cross between using a CHARACTER field and a MEMO field at the same time.
A 6 byte pointer is maintained at the end of the weakly-typed "V" field entry within the DBF file. When you define the field width for a new database file, keep in mind that weakly-typed "V" fields require this additional 6 bytes at the end.
Strongly-typed VariFields store DATE values in only three bytes, instead of eight, and LONG INTEGER values (up to ~2G) in only 4 bytes. Any "V" field defined with 4 bytes is automatically considered a strongly-typed integer, and "V" fields defined with 3 bytes are automatically considered strongly-typed DATE values. No additional space is required (6-byte pointer) for strongly typed VariFields.
FlagShip has additional types
V 10 Variable Variable, bin/asc data in .dbv (.dbf type = 0xB3) 4bytes bin= start pos in memo 4bytes bin= block size 1byte = subtype 1byte = reserved (0x1a) 10spaces if no entry in .dbv 2 2 short int binary int max +/- 32767 (.dbf type = 0xB3) 4 4 long int binary int max +/- 2147483647 (.dbf type = 0xB3) 8 8 double binary signed double IEEE (.dbf type = 0xB3)
|X||Variant (X) for compatibility with SQL-s (i.e. varChar).??||(CLIP)|
|@||Timestamp.||8 bytes (two longs)||First long repecents date and second long time. Date is the number of days since January 1st, 4713 BC. Time is hours * 3600000L + minutes * 60000L + seconds * 1000L.|
|O||Double||8 bytes||(no conversion)|
dBASE III Memo files are primitive 512 byte hunks of ASCII text data creating a way for text fields to exceed the 255 characters barrier of ordinary text fields. Other versions may store up till 64 KB of text in a fixed sized text field. Larger amounts of text (and binary data) is still stored in memo-like files. The size off the blocks can be user defined while creating the memo file (see byte 4-7 of the memo file structure).
|Note that memo fields are not fully supported by a majority
of Xbase utilities (incl. dBASE III). You can't export/import records with
memo fields (They are ignored in delimited exports in dBASE III).
To avoid problems with the priority of fields, put memo fields at the very end of the record.