Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I set my table exclusive
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00292759
Message ID:
00292832
Vues:
26
Ok, here it goes. I have a form (FormA) that has two timers (t1, t2). When the formA comes up I fire timer2 (t2) to check if someone has an exclusive lock on a tablex. I am setting exclusive lock on tablex to determine when to fire timer1 (t1) which will run an update process method. If a person does not have exclusive lock on tablex, then I start timer1, else I let timer2 continue monitoring to see if anyone has release a lock on tablex by exiting program.
My program is located on a novell server. I have 25 users accessing this one program on the server though a shortcut on desktop. I only want one person to run my update process method. I check to see if someone is exclusive through ON ERROR. If someone has exclusive tablex locked then an error will be generated and T1 will not be fired. Lets say I have User1 and User2. User1 comes in and T2 determines whether Tablex available or exclusive. If available then tablex becomes exclusive to user1 and timer T1 is initiated to run update process method. User2 comes in and tries to lock tablex exclusive but gets an error because tablex was locked exclusively by User1. T2 keeps firing periodically to see if User1 has exited the program or not. If User1 exits the program (I am assuming that releases exclusive lock by terminating program) then User2 will fire T1 when T2 determines that no one has exclusive lock on tablex. My problem is that I can't seem to get exclusive lock on tablex by anyone. Isexclusive() keeps returning .f. If I run multiple copies of this program on my local machine it works flawlessly. If I run this program on network (meaning my program resides on network and user access it through desktop shortcut) the it has a problem as far as locking tablex. I hope I haven't confused anyone and thanks for replying

thanks
Nick Patel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform