Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updateble Local Views
Message
From
21/11/2001 06:31:20
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
21/11/2001 01:10:43
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00584331
Message ID:
00584372
Views:
23
>How to make local view keep updated when change is making on another user?

refresh(). You will have to do this at regular intervals.

Note: If you use optimistic buffering, VFP will check whether the record you are trying to save has been modified by another user in the meantime. TableUpdate() will fail, in this case, with the default parameters (that is, VFP will not want to update it).

>
>Beside view, any alternative way to select subset of data, and update the data back to table?
>
>TIA.

I think views are the easiest way. Any workaround would be more complicated. With views, VFP does lots of work for you, which you would have to do yourself, otherwise:

  • Copy the data to a temp table.
  • Keep track of which records have been modified.
  • Copy those records, in a loop, back to the original tables.
  • This includes searching the original records one by one, in the underlying tables.
  • Keep, in a buffer, the values of the records, before you started editing.

    And some more, too, I suppose.

    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