Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Codes modification
Message
De
08/12/2006 07:39:44
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
08/12/2006 00:34:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01175957
Message ID:
01176012
Vues:
10
Hi John

>
>Select CASH_B
>Scan
>        cr1 = 0
>        acc_code = ""
>
>	Scatter Memvar
>	Select VOUCHERS

*There's no reason to do a LOCATE FOR followed by a SCAN WHILE.
*Just do SCAN FOR.
*You're confusing this with a SEEK and then a SCAN WHILE.
*SEEK can be much faster than a LOCATE

>	*Locate For Date = m.date And vou_no = m.balance;
>		And vou_type = 'JV'
>        *SCAN WHILE Date = m.date And vou_no = m.balance;
>		And vou_type = 'JV'

SCAN FOR Date = m.date And vou_no = m.balance;
		And vou_type = 'JV'

>	  If m.dr_amount>0 AND cr_amount > cr1
>             cr1 = cr_amount
>             ac1 = acccode
>          ENDIF
>        ENDSCAN
>
>	Select CASH_B
>	Replace ACC_CODE With ac1
>endscan
>
>
>It is not tested code. Also, performance also depend on whether you have proper index for search expression.
>
>HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform