You can use the VFP record/table buffering system. Use a combination of the GetFldState(), curval() and oldval() functions.
The following example is lifted straight from the VFP help for GetFldState(), once you have determined whether or not a field has changed you can use curval() and oldval() functions to query their original/current values.
CLOSE DATABASES
CLEAR
SET MULTILOCKS ON && Allow table buffering
OPEN DATABASE (HOME(2) + 'data\testdata')
USE Customer && Open customer table
=CURSORSETPROP("Buffering",5,"customer") && Enable table buffering
* Get field state on original cust_id field and display state
nState=GETFLDSTATE("cust_id")
DO DisplayState WITH nState
* Change field contents and display state
REPLACE cust_id WITH "***"
nState=GETFLDSTATE("cust_id")
DO DisplayState WITH nState
* Discard table changes and display state
= TABLEREVERT(.T.) && Discard all table changes
nState=GETFLDSTATE("cust_id")
DO DisplayState WITH nState
PROCEDURE DisplayState
LPARAMETER nState
DO CASE
CASE nState=1
=MESSAGEBOX("Field has not been modified",0,"Results")
OTHERWISE
=MESSAGEBOX("Field has been modified",0,"Results")
ENDCASE
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only