Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GETNEXTMODIFIED() detect add new rec
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01172021
Message ID:
01172024
Vues:
16
>Does anyone know if GETNEXTMODIFIED() detects the addition of (maybe several) records to a buffered table, obviously, before TableUpdate() is issued?
>
>The new records will have had fields filled in before saving.
>
>'ppreciate it
>
>Terry

Yes:
CLEAR
CREATE CURSOR crsTest (Fld1 I)
FOR asd = 1 TO 20
    INSERT INTO crsTest VALUES (asd)
NEXT
GO TOP
CURSORSETPROP("Buffering",5)
? [No changes],GETNEXTMODIFIED(0)
15
REPLACE Fld1 WITH 77
GO TOP
? [Record 15 is changed],GETNEXTMODIFIED(0)
TABLEREVERT(.t.)
GO TOP
? [Reverted table],GETNEXTMODIFIED(0)
13
REPLACE Fld1 WITH 77
APPEND BLANK
GO TOP
ln = GETNEXTMODIFIED(0)
SCAN WHILE ln # 0
     ? [Record ]+TRANSFORM(ln)+[ is changed],ln
     ln = GETNEXTMODIFIED(ln)
ENDSCAN
USE IN crsTest
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform