General information
Category:
Coding, syntax & commands
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?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only