Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I set my table exclusive
Message
 
To
18/11/1999 18:06:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00292759
Message ID:
00292785
Views:
25
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
Map
View

Click here to load this message in the networking platform