Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Uniqueness
Message
From
27/04/2003 12:14:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
27/04/2003 10:42:47
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00781915
Message ID:
00781975
Views:
19
>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)
  • Previous
    Reply
    Map
    View

    Click here to load this message in the networking platform