Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FLOCK on two tables
Message
 
 
À
16/09/2022 09:54:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01684967
Message ID:
01684968
Vues:
50
Hi Denis,

I usually deal with this situation by semaphore lock. That is, when a form is being loaded, the code locks a semaphore. And until the semaphore is unlocked, any other user will not be able to load this form; and get a message accordingly.

HTH

>Hello all,
>
>I have a form where two tables will have to be locked. it's a multi-users app.
>
>I am afraid that if two users get into that form, one could have a lock on table #1 and for whatever reason, the other user could have the lock on the second table.
>
>How can I make sure that when a given user gets one table locked he will also get the lock on the second table?
>
>I'm thinking about creating a table where one field would serve to tell me when a locked was made.
>
>so if field in controlling table tells me that nothing is locked I replace value with .T. so now I know I can lock the second table.
>
>And other user can't lock until user #1 is finished doing is things.
>
>?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform