>Hi,
>I got a problem that, my index is not valid, but VFP doesn't return any error!!
>I found that, I have a record inserted into table. Once I use LOCATE FOR.. to search, it is not found. But I am sure it is there. So, I use SET ORDER TO myIndex to order my table. And, the record I mentioned is "dissapear". I try to reindex it, and LOCATE it again. Yes! It found already.
>
>Why does it happen?
>
>Thank you
In a case like this, I would have the strong suspicion that the index was corrupted. Rushmore Optimization automatically uses available indices to search for records, with commands like LOCATE. With LOCATE ... NOOPTIMIZE, you would probably have found the record.
The REINDEX command corrected the corrupt index.
HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)