Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Private Sessions and record locking
Message
De
19/07/1998 16:34:39
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00119056
Message ID:
00119116
Vues:
20
>>I have 3 different forms all using private data sessions. 1 parent and 2 child forms.
>>
>>The client has requested that when a user is changing a child table that the parent record be locked and no other users be allowed to edit/delete the parent or child table records.
>>
>>I just locked the parent record, set the child forms as model and keep other users out of the child tables by checking if the parent record is alread locked. Well the problem comes up in that the client wants to access the child form without 1st passing thru the parent form. Now there are two ways to get to the child form and I need to check if the parent record is locked. The client will add more forms and child tables, so the problem will only get worse.
>>
>>I can't use a formset, it will be way too big and slow to load.
>>
>>Any ideas or schemes would be greatly appreciated.
>>
>>John Brooks
>
>Seems to me, you still have to have some intermediate step to determine which child records the user wants to edit. Maybe in the Form load method you could check to see if the parent record is locked [if locked()] then cancel the form load if it is. If not lock the parent record and continue.


No, I have the intermediate step covered of being on the correct chidl record. My problem is that when they click the edit button it needs to go out and lock the parent record, which maybe locked on another form in a private data session.

I need to be able check if the parent record is already locked by the same user and if so allow the user to edit the child record or if locked by another user, then not allow the user to edit the child record.

The bad thing in this process is that the child record can be accessed without going thru the parent form/table. So sometimes the parent record can be locked in the child form.

I leaning toward putting the whole thing in a formset, except for the speed issue.

John Brooks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform