Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TableRevert() does not remove record added to local view
Message
From
30/01/2001 13:50:03
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, United States
 
 
To
30/01/2001 13:09:39
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00470198
Message ID:
00470217
Views:
28
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform