Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BIZ Class Design
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01503016
Message ID:
01503058
Vues:
55
>>
>>Thank you very much. I have had very similar experience in working with biz object for two or more tables. And I thought I was missing some very basic concepts. And I also thought about creating some properties in the "primary" table BIZ object to "hook" BIZ objects for "child" or "secondary" tables. This way, my basic BIZ class can be used in a simple case and in some more complicated ones.
>
>About the only thing I do for that is I have a "TransactionSave()" method on my bizobjs. You can pass in one or more bizobjs (and cursor names) and it will wrap all of them into a transaction and call the "Save" method on each of them. If any of them fail I rollback the transaction. Error messages get bubbled back up to the primary bizobj (whose TransactionSave you called).

Thank you. I have a method called UpdateTable() which kind of has a similar section to your "TransactionSave()" method. But I will think of maybe I should break my method into 2 or 3 methods too.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform