Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Undo records added, deleted or changed
Message
 
 
À
08/02/2001 15:23:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00473833
Message ID:
00474194
Vues:
19
>>I have two identical views. I work on one - the other is to remember what I had to start with.
>>
>>I may add records, delete some, change data, etc. A session may last several hours. At the end of the session I ask: Do you want to keep your changes? If yes, then there is nothing further to do: the view I worked on has what is needed.
>>
>>However, if the user decides to abandon all changes, then I want to use the second view to put things back as they were. Deleted records should be restored, added records should be abandoned, and changes should be undone.
>>
>>I am going to delete all the records in my work-view and then append new records from the backup view. Before I go ahead and do that I thought I would ask here to see if there is perhaps another way to accomplish this.
>>
>>TIA
>>Cyril.
>
>First, make sure you understand buffering and how commands like TABLEUPDATE() and TABLEREVERT() work. That is a more common approach to what you're trying to do here.
>
>Second, I'd be very concerned about unsaved data entry sessions lasting "several hours". The first time the app goes down because Win9x decided to hiccup, there was a power bump, etc. your users will scream bloody murder. If you really want to architect your app this way, you'd be well advised to implement an MS Word "Autosave"-type feature - i.e. automatically save pending changes to disk (a temporary table(s) somewhere) every xx minutes.

Thanks for your reply. I am doing tableupdates all the way, so my working view corresponds to the status of the data in the table. What I want is a sort of "global revert" where all changes can be lost and the second view (a copy before any changes) can be restored.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform