Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GO EOF() Does Not Work
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00117869
Message ID:
00118036
Views:
25
>----------
>
>Sounds like a good solution, but I'll have to do some studying on buffering, tableupdate, and tablerevert. This is another part of VFP that I haven't used. Can you give me some guidelines as to how to go about using these? Thanks, CH.

Chuck,

Sure, here's an easy way to get used to them. Set the buffermodeoverride property of your tables to 5 - Optimistic Table Buffering and in your Save button do;
IF TableUpdate( 0, .F., "<AliasName>")
   * Update failed
   THIS.cmdRevert.Click()
ENDIF
For each alias that is open. IN the revert button's click;
TableRevert(.T.,"<The alias name>")
...
<PRE>

For each alias in the form. 

You make this more generic with the buttons by using a form class that has  DoSave and DoRevert methods.  Thennyou write the code in the form's methods and call those from the buttons. In this case the Save button's click becomes;

<PRE>
IF NOT THISFORM.DoSave()
   THISFORM.DoRevert()
ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform