When Visual FoxPro creates an index, it evaluates fields in the first record in the table. Therefore, if the index expression is a substring of an empty memo field, a zero-length index key is created. Tip: To prevent creating a zero-length index key if a field is empty, it might be necessary to enter some temporary data in the field of the first record.This is true for temporary index that SQL engine build, but it is not true
clear ON ERROR ? MESSAGE() CREATE CURSOR testindex ( f1 char(1),l1 I) INSERT INTO testindex VALUES ('',1) INDEX ON left(f1,l1) TAG t1 INSERT INTO testindex VALUES ('',0) ? "reindex" REINDEX INSERT INTO testindex VALUES ('',1) ? "reindex" REINDEXAn side effect is that when VFP build a temporary index,
CREATE CURSOR testindex ( f1 M) INSERT INTO testindex VALUES ('1') INDEX ON SUBSTR(f1,5,10) TAG t1Workaround: