Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing object status in midstream?
Message
 
 
À
16/10/2000 14:23:33
Raymond Humphrys
Michigan Department of Community Health
Bath, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00429884
Message ID:
00429910
Vues:
13
Well, if you use pessimistic locking in your application, there are functions in VFP that allow to check if record is locked by another user. Than you can do this in timer event and refresh status of controls on form accordingly.

>Well what I really want is a friendly looking locked record, with only ONE user allowed to EDIT at a time. Person gets a record, for everyone else all fields are disable and a different color. When person A is done, the next person who gets the record will have all the fields enabled, and for everyone else R/O.
>
>I don't ahve to check if the curval=oldval as only one person can changed at a time.
>
>
>>Hi!
>>
>> You cannot do this without constant checking of table on the server. This could be done, for example, using timer event and simple table on server where you register wich user, record and table currently in edit mode. In addition, you will need to make wrapper for all your data editing that will control registering. This require a LOT of programming, and this will cause more network traffic.
>> However, better technique is to check if there was changed something on server and ask user to overwrite changes for record or each field. This is much more simple to organize, not cause additional network traffic and used most comonly so you can easy find algorithms in the Internet. This uses OldVal and CurVal VFP functions.
>>
>>>Does anyone have any suggestions how to implement a changing of an objects status, switching from R/O to R/W? For example, on a pageframe control if a user A is editing it I have all the conrols set to R/W and change the colors so it's obvious to other users who are browsing around that this record is being edited. When user A has completed their editing a flag variable is set on the record that user A is completed. If user B is on the 4th tab of a pageframe I want to switch that status immediately to R/W.
>>>
>>>Has anyone implemented something like this?
>>>
>>>thanks
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform