Information générale
Catégorie:
Codage, syntaxe et commandes
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement