Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory Variable problem
Message
From
20/03/2002 07:12:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
20/03/2002 07:01:36
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00634629
Message ID:
00634861
Views:
17
>Hi Hilmar,
>
>Thanks a lot for helping. Actually i am not familir with tableupdate() and table revert()...
>I am using simple insert command to updating table from memory variable. Some cases one memory variable being written in more than 2 table.
>Better suggestion highly apreciated.

If the user changes data interactively, the better suggestion, IMHO, is to use buffering. If you open tables in the Form.Load() event, use CursorSetProp("Buffering", number) - number will usually be either 3 or 5. See the help for details. If you use the form's DataEnvironment, there are corresponding properties which you can set on the cursor object.

Once buffering is enabled, changes are not stored directly to disk, even if a TextBox.ControlSource is set directly to "Table.Field".

Instead, you are supposed to save changes with TableUpdate(), and cancel changes with TableRevert().

Please see the help topics under CursorSetProp("Buffering"), TableUpdate() and TableRevert(). The corresponding topics are explained in chapter 17 (in VFP 6), "Programming for Shared Access".

At least for the standard case, if you use buffering, you don't need additional variables / properties for each field.

Hilmar.
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
Next
Reply
Map
View

Click here to load this message in the networking platform