Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I set my table exclusive
Message
De
18/11/1999 18:39:18
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00292759
Message ID:
00292789
Vues:
29
>Thanks for replying. Yes I have set exclusive on, and it is set for private datasessions. My isexclusive returns it as .f. Here is the code I am running in a timer that fires periodically. If my table is get exclusive lock then I start another timer.
>
>local xx, yy, bb, worked, isa
>xx = 1
>yy = 2
>with thisform
>Worked = .t.
>cErrHandler = ON('ERROR')
>ON ERROR Worked = .f.
>set exclusive on
>USE xtable exclusive
>
>isa = isexclusive("xtable",1)
>cMessageTitle = 'My Application'
>nDialogType = 0
>
>DO CASE
> CASE isa = .t.
> cMessageText = 'locked'
> wait window alltrim(cMessageText) timeout 0.5
> CASE isa = .f.
> cMessageText = 'no lock'
> wait window alltrim(cMessageText) timeout 0.5
>
> ENDCASE
>
>
> ON ERROR &cErrHandler
> IF Worked
> bb = '(((((( FILE EXCLUSIVE ))))))'
> wait window alltrim(bb) timeout 0.9
> .T1.enabled = .t. && start timer1
> ELSE
> bb = 'oooooo File Not Free ooooooo'
> wait window alltrim(bb) timeout 0.9
> ENDIF
> if .t2sw = .f.
> .T2.interval = 25000 && set new timer interval
> .t2sw = .t.
> endif
>endwith
>
>
>It should lock, could it be that this is in a timer and I keep issuing use tablex exclusive periodically when the timer fires?

PMFJI But I thought the ISEXCLUSIVE was only detecting if you had the file opened exclusively on the current machine.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform