Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with SCAN...ENDSCAN
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00153935
Message ID:
00153957
Vues:
20
>I have a cursor called cpayment with 3 records. The cpay_flag is .t. and cpay_schdate has a date in all 3 records. When I run the following code it only loops through one record, not all 3. If I comment out the replace cpay_schdate with {} and replace cpay_flag with .f. the SCAN will loop through all records. Now I know whats causing the problem but I don't understand why.
>
>
>select cpayment
>SCAN FOR ((cpay_flag = .t.) and (!empty(cpay_schdate)))
>	replace cpay_schdate with {}
>	replace cpay_flag with .f.
>	if !cpay_update = 'D' then
>		replace cpay_update with "C"
>	endif
>	replace cpay_amt with 0.00
>ENDSCAN
>
Hi Paul,

While I haven't been able to duplicate your results, there's something that happened that you might want to be aware of. Using VFP 6.0. I had:

SCAN FOR cpay_flg and NOT EMPTY(cpay_schdate)

and it worked fine. However, when I changed it to cpay_flg = .T., I got a fatal exception error after the last record.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform