Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple table update view insert
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00551919
Message ID:
00552941
Vues:
27
Kevin,

Thanks.

I will be breaking the one view up into 2 separate views.

Would you mind commenting on the approach I plan to use, which will be implemented in the PreSaveHook method of the associated bizobj (which is a child of the form's primary bizobj):
while still primary bizobj's transaction,
set secondary view's view parameter with a list of iids requiring update
use (open) secondary view, which executes the view's select
in scan loop update view's result set
begin transaction
if tableupdate()
end transaction
return .t.
else
rollback
return .f.
which should cause all open transaction levels to be rolled back

This approach mimics a child bizobj save done within its parents transaction.
I will not be updating primary keys, only foriegn keys referencing the form's primary bizobj's record.

TIA.

Doug
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform