Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Private Sessions and record locking
Message
De
20/07/1998 17:26:25
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00119056
Message ID:
00119476
Vues:
21
>>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
>
>John, you may have to re-think your design and procedures. Because if you lock a record on any table, that record is locked on all systems, in all datasessions, and there is no 'lockedby()' function to tell who locked it.
>
>Instead of formsets, perhaps there is a way to use the default datasession for these forms so that each user will have a single datasession to check for locks. Remember that a if modal form has the default DS set, and is called from a form with a private DS, then the modal form actually uses the private DS of the calling form. Perhaps this could be useful.
>
>Barbara


Thanks Barbara,

I'm going down this development path and after thinking thru all my forms and ways to get to the forms, this may be my best approach for now. I wish there was a way in VFP to tell if the same user has the record locked in another datasession without tooling thru all datasession and trying to lock the table if it is used.

John
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform