Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need Multi-User Suggestions
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00411028
Message ID:
00412249
Vues:
12
Option 4. with some of three. Use optimistic table buffering, set multilocks on. When the user saves the record. Lock the record. Compare editted values, the original buffered values and the values on the disk.

CurVal() Value of field on disk.
OldVal() Original Buffered value.

Compare the curval() and oldval() for all fields to build a list of fields editted by other uses.

Compare the oldval() to the current value of the fields to build a lst of fields that the user has ediited.

Compare the tow lists. If there are any matches, prompt the user with the orignal value, the other uses edit and the current user's value for the field and allow the user to pick with of the three values to save.

this can be done in multiple picklists. Each field has it's own picklist with the current users values for the fields highlighted. Put a time out on the form so that the record lock does not hold the record indefinitely.

If the save routine cannot get the record lock, prompt the user to wait and retry or cancel the changes.

Hopt this helps.



>I am working on a LAN application.
>
>What is the best way to handle multiple users accessing the
>same records at once?
>
>1. Do I lock the record when the user navigates to it, therefore
>ensuring that the record is available, but keeping everyone else
>out indefinitly?
>
>2. Try to lock the record when the user starts editing, and possibly
>pop up an error message if the record in use?
>
>3. Try to lock the record when the user clicks Save, and possibly
>pop up an error message if the record in use, and forcing the user
>to either wait, or discard all the changes?
>
>4. Or, .... what eles can I do?
>
>Thanks
Fred Lauckner

You know, it works on my computer. I don't know what your problem is.

.Net aint so bad.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform