Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AutoInc question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00757141
Message ID:
00757658
Vues:
25
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform