Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One to Many question
Message
De
04/01/1999 22:23:46
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00172331
Message ID:
00172634
Vues:
28
>Jim,
>Buffer both the parent and child tables, then wrap the TableUpdate() commands in a transaction.
>
>The parent table should have row buffering, and the child table needs table buffering (so many records can be added/edited for a single parent).
>
>If there are relatively few fields, you can put the parent fields at the top of the form and the child grid below it. Otherwise use a pageframe as Nigel suggested.
>
>When saving:
>Begin Transaction
>SELECT Parent
>lRet = tableupdate(0,.t.)
>if !lRet
> Rollback
>endif
>
>SELECT child
>lRet = tableupdate(1,.t.)
>if !lRet
> Rollback
>else
> END Transaction
>endif
>Note that I tested the return value for each TableUpdate() command, and did a RollBack if necessary. The first parameter in TableUpdate determines whether ALL records are saved or just the active record. Check Help for more information.
>
>HTH
>Barbara
>
>
>
>
>>Should I wrap the whole thing into one transaction? Or do I have each record added as entered? I like the PageFrame idea.

Isn't it possible to have the two files get out of synch when handling it that way?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform