Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question about FLOCK and REPROCESS
Message
From
15/02/2001 12:12:54
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Question about FLOCK and REPROCESS
Miscellaneous
Thread ID:
00476348
Message ID:
00476348
Views:
71
Hello,

I'm using VFP 6.0 SP3.
I want to lock tables, then if the programm cannot lock them after 5 seconds, I want the program to continue on with an error message. When testing, I force the error to appears but it doesn't seems to retry to lock more then once. In fact, I get the error message in less the one second.

I also tried with SET REPROCESS TO 5000 without success either, the messages appears very quickly.

If it make any difference, tables are in buffering mode 5 and 3.


lnDebut = seconds()
SET REPROCESS TO 2000 SECONDS
laTableAlias[1] = "ARINVOIC"
laTableAlias[2] = "ARINVDTL"
laTableAlias[3] = "ARINVFEE"
laTableAlias[4] = "GNPARAM"
FOR i = 1 TO 4
llSuccess = FLOCK("&laTableAlias[i]")
IF !llSuccess
lcCauseExit = "cannot make lock for: " + laTableAlias[i]
EXIT
ENDIF
ENDFOR
lnfin = seconds()
IF !llSuccess
wait windows lcCauseExit + str(lndebut-lnfin, 8,2)
ENDIF

THANKS.
Diane Robitaille eng.
Next
Reply
Map
View

Click here to load this message in the networking platform