Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make this process more efficient?
Message
From
02/09/2002 14:42:46
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
02/09/2002 12:28:28
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00695944
Message ID:
00696000
Views:
9
>>
>>The capability to save vs. undo changes is usually done through buffering - this can be done in views or in tables.
>>
>>Functions OldVal() and CurVal() can get the previous value (before the change), and the value on disk (read again from disk, in case another user made changes).
>>
>>Saludos, Hilmar.
>
>Thanks.
>
>I use table buffering, my problem is that the record set is seen in a grid.
>For instance, if I want to insert records from a table into the view, in order to see new record I'll have to execute tableupdate() and requery().
>
>Saludos.

What do you mean with "new record"? The changes done by the user himself are visible immediately. For changes done by other users, indeed, you have to requery.

Most of the time, this isn't important - as soon as you issue TableUpdate(), VFP will detect whether there have been changes done by other users. That is, TableUpdate() will fail. Actually, this depends on the parameters - you can overwrite changes done by other users, but I consider this dangerous.

If it is really important to know, not only that there have been changes, but the exact values on disk, you might open the view twice (with a different alias).

HTH, 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
Reply
Map
View

Click here to load this message in the networking platform