Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace or Update
Message
De
18/06/2019 02:18:43
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01669142
Message ID:
01669147
Vues:
72
>>Hello friends, REPLACE or UPDATE. Which one should I use? Why?
>
>What is the exact intention and what do you want to do? I think both should work fine but REPLACE command moves record pointer and UPDATE doesn't.
Misleading answer - Replace does NOT move record pointer if written without defining the scope of records (ALL/FOR/REST)
CREATE CURSOR t1 (F1 I, F2 I, F3 I)
APPEND BLANK
APPEND BLANK
APPEND BLANK
GO top
REPLACE f1 WITH RECNO()
REPLACE f2 WITH RECNO()
BROWSE
Use Replace for all changes of a single record in place, use update for all changes involving potentially more than current record (unless REST handling makes sense, which it sometimes does...)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform