Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Increasing primary key integers in a table
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00138182
Message ID:
00138285
Views:
12
>>I [assign a PK] in the Record Validation Rule; if the key field is empty, I determine an appropriate value for the key and REPLACE the key with it.
>
>Interesting. What would you say is the benefit to doing it then, instead of making the key determination the default value?
>
>A drawback that I can see is that you don't find out what your PK is until TableUpdate(), and I have one app where I add both parent and child records at the same time. The child needs to know the parent's PK right away.

Why? Do you want to say that you add records to unbuffered child table before tableupdating parent one? If you don't then you just firslty tableupdate() parent record and then tableupdate() child view/cursor.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform