Mike,
Of course you are correct the use of m.Dot and macro in this way is incorrect. Thanks for pointing.
The use of the Where clause is indeed discutable.
The main point of my entry was to inform that a cursor can be 'packed' by reconstructing the same cursor from itselve with condition only the undeleted rec's.
Hope that at least that was correct.
And yes I normaly never set Deleted to OFF, although there are situations, even with an extra flag field lDeleted it can be handy.
Best regards,
Koen
>>
>>Gerad,
>>
>>Try
>>
>>
>>lcDeleted = Set("DELETED")
>>SET DELETED ON
>>SELECT * FROM myCursor WHERE !DELETED INTO CURSOR myCursor NOFILTER READWRITE
>>SET DELETED &m.lcDeleted
>>
>>
>>Regards,
>>
>>Koen
>
>Hi Koen
>
>You cannot use mdot with macro-substitution like that. Also once you have enabled SET DELETED ON, there is no need for the where !deleted. Furthermore, DELETED() is a function, and I'd never use a function that takes an alias in SQL. I'd write it like this...
>
>
lcDeleted = Set("DELETED")
>SET DELETED ON
>SELECT * FROM myCursor INTO CURSOR myCursor NOFILTER READWRITE
>IF m.lcDeleted = "OFF"
> SET DELETED OFF
>ENDIF