NULL in CDX files
2007-08Aug-20
VFP doesn't store NULL in the field itself. Instead it uses a hidden field called _NULLFLAGS. You might wonder (well, I didn't, but you might) how VFP can create an index on a column that contains NULL, if NULL is not stored in the field itself. The answer is actually quite simple. A field that contains NULL is stored as a blank string. To distinguish NULL values from real blank fields, VFP precedes any other value with CHR(0x80). Hence, in Northwind\Customers.CDX the index on city contains "_PARIS" instead of "PARIS".