It's my strong opinion that SET DELETED should be ON by default in an application. Any deleted record should be considered as none-existent. If application requires to keep deleted records around for whatever reason than such record should have special field to mark it as deleted instead of VFP DELETE. It will be consitent with any other database you can/will use.
>I totally agree that it does not work. If the result is unpredictable, it does not work, simple. In my current job, we work with raw data and I don't build standalone EXEs any more. Everyone works with DELETED = OFF, so that is why I was using DELETED() in the SQL. Well, from now on, any processes that I need to create and run will have DELETED = OFF and I will restore the DELETED value upon exit.
>
>Thank you, Sergey.
>
>David
--sb--