Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TableRevert() does not remove record added to local view
Message
De
30/01/2001 13:50:03
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
 
 
À
30/01/2001 13:09:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00470198
Message ID:
00470217
Vues:
25
Once it is saved (TableUpdate()) then it is saved. TableRevert() is used when there is a record but not saved. APPEND is actually saving a record. TableRevert is used with buffering.

Chuck

>I have an one to many, parent to multiple child relationship. The children are shown in a grid on the parent form. There is a "edit,add,delete" button that fires a "sub" form for the children. The data for the child sub form is a local view of the child table with just the children of the current parent in it.
>
>When the user adds a new child record I add a blank record to the view and fill in all of the proper ID fields to initalize the record.
>
>If the user does not want this new record he picks Revert (the opposite of Save) which uses TableRevert(.t.,LocalView). Table Revert should 'delete' this newly added record. Actually the record should be tossed out completely.
>
>However the new record with its inital values remains in the local view and has to be manually deleted. Any changes the user made between Add and Revert are also in the record.
>
>The same code in the Parent form works as it should on tables. Just not on local views
>
>As a work around I delete the record in "Revert" if the form class indicates we are in an instance of "SubForm" and working on a view. This deletes the record and everything is as it should be except that I end up with a deleted record in local view source table were I should have nothing.
>
>Any suggestions? What am I missing?
Today is tomorrow's yesterday.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform