Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FPD25: SCAN WHILE fails SCAN FOR doesn't
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00614777
Message ID:
00615976
Vues:
28
Hi,

Also, Have you tried a DO WHILE...ENDDO LOOP with a SKIP instead of the SCAN...END loop?

HTH,
Arriyel

>Hi Arriyel
>
>Thanks for you response but I cannot remove the DELETE outside the loop as there are changes dependent just before the delete and we have a lot of electricity problems here. Any other thoughts.
>
>
>>Hi,
>>
>>I think the DELETE is the one causing the problem.
>>
>>Try moving the delete outside of the SCAN...ENDSCAN loop and use a DELETE FOR instead (might even be faster this way).
>>
>>HTH,
>>Arriyel
>>
>>>Hi all
>>>
>>>I have a function skel like below:
>>>
>>>
>>>FUNCTION myFunc
>>>
>>>	PARAMETERS myID
>>>
>>>	SELECT myDBF
>>>	SET ORDER TO TAG myField
>>>
>>>	= SEEK(myID)
>>>
>>>	SCAN WHILE myDBF.myField = myID
>>>		SELECT myOtherDBF
>>>		*** myOtherDBF manipulation logic goes here
>>>
>>>		SELECT myDBF
>>>		DELETE
>>>	ENDSCAN
>>>
>>>
>>>This fails, what am I doing wrong. Just change the WHILE to FOR, though slower will never fail.
Speak using soft and sweet words in case you have to eat them later.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform