Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strategies for reverting data
Message
From
02/01/2008 18:08:07
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01278863
Message ID:
01279123
Views:
15
>I understand table buffering well enough but it breaks down quickly when using parent-child-grandchild-etc tables with forms. Then you are faced with having to save the record somehow to revert it without actually calling tablerevert. What is a good strategy to do this?
>
>1. Scatter to memory... object... array?
>2. Copy the record to a temp table?
>
>
>Then should I bind the actual fields to the controls and copy the data back to the table if I need to revert or should I bind to whatever I scatter to and copy the scatter vars back to the table in the need to save?

You should use buffering in any case; you can use local views (parameterized) for the child table, for performance reasons.

You should think about the user interface; in the Visual Extend framework, one way this is managed is having separate forms for parent and child. In this case, the user can't even start working on the child record before saving the parent record.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform