Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do while problem
Message
De
03/06/2005 02:19:25
 
 
À
03/06/2005 01:01:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
01019676
Message ID:
01019686
Vues:
18
Dear Tariq,

The part in the middle:
LOCATE for date=AA and VOU_NO=bb and VOU_TYPE=cc
DO while FOUND()
REPLACE d1 WITH dd
ENDDO
Should be:
LOCATE for date=AA and VOU_NO=bb and VOU_TYPE=cc
DO while FOUND()
REPLACE d1 WITH dd
CONTINUE
ENDDO
BUT there is a shorter way; you can change that part to:

REPLACE for date=AA and VOU_NO=bb and VOU_TYPE=cc d1 WITH dd

So your code will look like:
SELECT vou_sum
GO top
DO while !eof()
AA=date && date type
bb=VOU_NO && numueric type
cc=ALLTRIM(VOU_TYPE)&& character type
dd=d1

SELECT VOUCHERS
REPLACE for date=AA and VOU_NO=bb and VOU_TYPE=cc d1 WITH dd

SELECT vou_sum
Skip
ENDDO

Then, make the next step: the sequence GO TOP, DO WHILE !EOF(), SELECT vou_sum, SKIP and ENDDO is equal to SCAN...ENDSCAN, so:

SELECT vou_sum
SCAN
AA=date && date type
bb=VOU_NO && numueric type
cc=ALLTRIM(VOU_TYPE)&& character type
dd=d1

SELECT VOUCHERS
REPLACE for date=AA and VOU_NO=bb and VOU_TYPE=cc d1 WITH dd

ENDSCAN

I hope you are helped with this.

Lennert Blom
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform