Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GETNEXTMODIFIED() detect add new rec
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01172021
Message ID:
01172024
Views:
15
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform