Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tranactions and Views Problem
Message
From
15/01/1997 08:59:46
 
 
To
14/01/1997 18:23:23
General information
Forum:
Visual FoxPro
Category:
User groups
Miscellaneous
Thread ID:
00017064
Message ID:
00017430
Views:
64
>>Why do you need transactions before you update base table? It looks strange a little bit.
>
>The reason for using transactions in the example is not obvious. In practice I need to update several tables from several views and allow rollback of the whole set of changes should any one of them fail for whatever reason, hence the need for nested transactions.
>
>One the other hand I may be missing something obvious!

Any transaction supposed to be something fast, automatic change. I guess in your case (for local views) you could consider moving your actions into some trigger procedure to update other tables. The update operations would look like:
1. Tableupdate() particular local view.
2. Fire trigger UPDATE/INSERT/DELETE code for the base table.
3. Trigger procedures change contains of other tables.
All these things highly depend on your form design (how many and what kind of views you bring up). I just think that local views and transaction before tableupdate() looks premature. Sometimes you run transaction successfully for bunch of views and then get in trouble making tableupdate() for one of views.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform