Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CURVAL () ---really works???
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00429072
Message ID:
00429091
Views:
19
Ariel,

CurVal() and OldVal() will only be different if another user has changed the record since you last read it. CurVal() tells you teh current value for the field on disk and OldVal() tells you what value your buffer started with. So ;
SELECT MyTable
* Buffered: Field1 = "XYZ"
Replace Field1 WITH "ABC"
? CurVal("MyTable.Field1")  && Returns XYZ
? OldVal("MyTable.Fiedl1")  && Returns XYZ
? MyTable.Field1 && Returns ABC
* Another user changes the value to MNO and updates the table
? CurVal("MyTable.Field1")  && Returns MNO
? OldVal("MyTable.Fiedl1")  && Returns XYZ
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform