Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need Scan..EndScan code help
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00166652
Message ID:
00166656
Vues:
14
Brenda,

SCAN works on teh work area selected when teh SCAN line is first hit. You can change work areas inside the SCAN if you want and the ENDSCAN will reselect the original work area.

You can adjust your code like the following;
** Update customer.dbf with the updated records from oTemp
SELECT customer
SET ORDER TO TAG cid_cseq
SELECT oTemp
LOCATE FOR Cust_seq = Customer.Cust_seq
SCAN WHILE cust_id = m.cust_id
      SCATTER MEMVAR MEMO
      SELECT collat  && what is this work area?
      GATHER MEMVAR MEMO
ENDSCAN
The above code will locate the first amtching record in oTemp and then process all records that match.

One problem, every record processed will overwrite the previous data in Collat because there is no appending of any new records in that table.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform