>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
No, it doesn't fail. After I deleted all the indexes though, when I finally put them back, the PK failed. I now know that my indexes were corrupted but I'm wondering how it happened and how I can detect a PK not failing when it should (maybe I shouldn't trust VFP and code the PK by hand)?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Well, if the index is corrupt and you add records, the PK or candidate key checks can indeed fail. I've seen it several times. To be honest, I tend not to rely on a VFP error for determining whether such a key already exists -- I like using a system generated PK, and if I have candidate keys I check for 'em int he business logic, and I consider the index itself as a "backup" check.
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell