>>>
>>>SET DELETED OFF
>>>
>>
>>You have turned off the DELETED filter. That is why you are getting deleted records. Change this to SET DELETED ON.
>
>I think I'm not making myself clear. I WANT deleted records returned, but I want them returned with the deleted flag set as it is set in the table itself. This only happens if DELETED, ANSI, and EXACT are all set off. If I set either ANSI or EXACT to ON, the deleted flag is wiped out and the record is returned as non-deleted. I can't find any documentation that says why ANSI or EXACT should cause such behaviour.
You have to understand one fundamental thing, namely that the ANSI standard is to ignore deleted records completely, since deleted records are considered non-existent, and may in all "normal" sql systems be reused without your control. VFP is not "normal", and if you need to see the deleted flag, you have to trick it. One trick is to set ANSI off and EXACT off, as you have found out. Another, and much better, solution is to forget about the deleted flag, and in stead add a logical field, personally I call this field Active.