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:
00138356
Views:
17
Mark,

My FK Default Value for child tables is a UDF: ParentKey( "ParentTableName.iID" ) I use a udf so I can trap parent table not open errors.

>Yes, you're right. But that breaks up the processing. You have to TableUpdate the parent, then Replace the foreign key in the child, then TableUpdate the child.
>
>The way my framework works, you add both the child and the parent record, default the fields that can't be defaulted automatically (including replacing the parent foreign key in the child record), allow edits, then do the TableUpdates.
>
>I guess this approach isn't better than another, though. It does seem to me that it makes the child record logically consistent at an earlier stage, but that's not necessarily better.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform