Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AutoInc question
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00757141
Message ID:
00757658
Views:
20
This message has been marked as the solution to the initial question of the thread.
Hi Paul.

>I have AutoInc on a table, and have a view that uses this table. I add new record to this view and need to use the new record's PK as a FK in another view before doing the update. How do I do this?

You have to update the parent table before you can get the newly assigned PK to use in the child table. If you don't want to commit the change until after the child table has been updated, buffer the parent table. Of course, you'll have to use TABLEUPDATE() on the parent table as well as the view in that case, but it's the only way to get the new ID.

Doug
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform