Metin,
At the time you created the index using "for !deleted()" your example records 10, 11, and 12 all existed and none were deleted. They all have the same key so UNIQUE would
only insert record 10 into the index. The other records, 11 and 12, are not in the index
at all at this point because record 10 was first unique occurance.
Then you delete record 10 which deletes the record from the index too. But the act of deleting one record would not ask or require VFP to reindex the table to find another record with the same key ie. record 11. IOW, the "for !deleted()" clause is not helping you achieve your objective. It simply ignores deleted records when creating the index and/or when appending deleted records into the table.
>you said,
>
>...becuase just deleting a record does not remove it from the table. It is only marked for deletion and still exists in the file and therefore the unique index is still...
>
>that's not true at all (i know delete doesn't physically delete record. ). because i indexed file with "for !deleted()" keyword and the unique index key isn't more still in indeks when after deleted.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.