Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SET DELETED ON???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00217935
Message ID:
00218497
Vues:
21
Rich,

My reasoning for the FOR clause addition is simple...

This clearly doesn't ever want to handle deleted records and putting it in the SCAN ensures that (ever) changing the SET DELETED setting will not impact this routine. It also makes it obvious to the developer whenever that routine is examined.

Cheers,

Jim N

>Ken,
>
>I'm not the one who had the problem. I just jumped in to say that I was surprised that so many people (including some acknowledged gurus) were telling the person to use SCAN FOR NOT DELETED() when he said he had DELETED ON.
>
>Thanks anyway,
>Rich.
>
>>Hiya Rich,
>>
>>I believe your record pointer is not moving off the deleted record and that is why you're seeing it. By bypassing the endscan, you're also bypassing the implied skip that goes along with it. Try putting a ? recno() in the loop and you should see what I mean. I agree with the others here that have already said that scan for not deleted() would be a better approach.
>>
>>>>Steve,
>>>> [snip]
>>>>2) I'd add a not DELETED() to the SCAN for clause
>>>
>>>I'm confused. Lots of people besides Jim have said this.
>>>
>>>If SET DELETED is ON, SCAN is already SCAN FOR NOT DELETED(). Or what am I missing?
>>>
>>>- Rich.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform