Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Occasionally hanging on a table with buffering
Message
From
19/01/2008 10:35:48
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
19/01/2008 10:29:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01283131
Message ID:
01283242
Views:
18
>Cetin --
>
>Ahhh, I was turning on buffering MUCH later ... I'll try it in LOAD.
>
>Seems odd that the timing would matter, but I assume that's because I don't understand the mechanics.

Of course, you would have to turn on buffering before the user even starts editing.

As to the "mechanics" - the basic idea is that Visual FoxPro keeps two copies of the record:

1. the value before the user started changing. This can be checked with oldval(...). Also, Visual FoxPro uses this value to check if there is an update conflict, i.e., another user changing the record after you started editing. (The value is compared with the value in the database itself, which can be obtained with curval(...)).

2. The value of the record, changed by the user in memory. This is the value accessed directly, with TableName.FieldName, or through the ControlSource of a TextBox or similar object.

If this sounds a little complicated, there is no reason to worry for now; but just remember to turn buffering on at the beginning, might be in Form.Load(), and don't change it again later.
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