Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Codes modification
Message
From
08/12/2006 07:39:44
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
08/12/2006 00:34:11
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01175957
Message ID:
01176012
Views:
8
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
Previous
Reply
Map
View

Click here to load this message in the networking platform