>Can you please give a brief example of buffering, say when I've selected a record and presented to the user on a form for editing, what's the syntax for commiting the edit/update to the table, or reverting to the original data?
>
>TIA
Randy,
Once buffering is set up you use TableUpdate() to post changes to the table and TableRevert() to revert the user's changes back to what they were before the edit. So the code in the Click event of a Save Button might something like;
IF TheDataIsValid
IF NOT TableUpdate(1,.F.,"TheAlias")
Do somet hing about the update failing
ENDIF
ELSE
Tell the user there is a problem with the data
ENDIF
And in the Cancel button;
TableRevert(.T.,"TheAlias")
Thisform.Refresh()
Be sure to read the help file on both TableUpdate and TableRevert to understand what the arguments are for.