Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Most effective way to compare 2 collections
Message
From
15/07/2003 09:15:02
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
15/07/2003 08:27:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00810098
Message ID:
00810171
Views:
12
>Hi,
>In fact, I am using collections to store list of my item's prices.
>Once user press save button, my application will loop thru the collection to get the prices and save to table.
>
>Since, it allow multiple changes in a save operation, I choose "delete and insert" way to save them to table. IOW, I will delete all relevant record, then re-insert the latest list one by one.

I think it would be easier if you use a parameterized view, and table buffering. In this case, Visual FoxPro will take care of many details. Basically, you just issue a TableUpdate(), and Visual FoxPro will see what records need to be updated, added or deleted, in the original table.
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