>Hi,
>Because I am using GATHER
Still, there is no need to change a new record. You do use buffering, right?
Make sure buffering is enabled.
Use APPEND BLANK to insert a new record.
Create your record object, pressumably with SCATTER NAME.
Use GATHER NAME to insert into the new record.
Issue TableUpdate(). Only here will VFP check for uniqueness - not previously.
Overwriting the PK value with the SAME value it had before should not cause problems.
However, if you copy a previously existing record, you must copy the new PK value (assuming it was automatically assigned through a default value) back to the record object, before issuing GATHER. Otherwise, you will have the PK from the OLD record.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)