>>>The buffermodeoverrid set to 3
>>>The stockcode field set to the candidate key
>>>
>>>I implement a ADD button inwhich I APPEND BLANK
>>>With SAVE button, I confirm the adding by tableupdate()
>>>and UNDO button, code tablerevert()
>>>
>>>However,whatever I change the parameters, I got a new record with NULL
>>>stockcode after I press ADD, then UNDO it.
>>
>>When you add a new record under buffering, you need to delete it and then TABLEREVERT() to get it to go away, if I recall correctly.
>
>Strange, because it works fine under table buffering...
From VFP Programmer's Guide, Chapter 17, Programming for Shared Access:
To remove an appended record from a table bufferUse the GO command with a negative value to position the record pointer at the record to be deleted.
Use the DELETE command to mark the record for deletion.
Use the TABLEREVERT( ) function to remove the record from the buffer.
Note The TABLEREVERT( ) function also affects the status of deleted and changed rows.