Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
=INKEY() problem?
Message
From
14/04/2003 11:08:44
 
 
To
12/04/2003 07:05:53
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turkey
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00776833
Message ID:
00777219
Views:
10
From the FoxPro 2.6 Help documentation on SET REPROCESS TO > 0 [SECONDS]: "For example, if is 30, Foxpro attempts to lock a record up to 30 times. If you also include the optional keyword SECONDS (SET REPROCESS TO 30 SECONDS], Foxpro continuously attempts to lock a record or file for up to 30 seconds."

I did a test:

* reprocess is set to the default of 0
nCount = 0
nEnd = SECONDS() + 1
USE MYTEST
* Record 1 is locked by another workstation)
GOTO 1
DO WHILE ! RLOCK() .AND. SECONDS() <=nEnd
nCount = nCount + 1
ENDDO
USE
@ 5,5 SAY ALLTRIM(STR(nCount))

Fox made 12,400 network locking requests in 1 second on our network. I'm sure the Admin wouldn't be happy if 100 users were doing that all the timr.

Thus my solution:

DO WHILE ! RLOCK()
= INKEY(.1)
ENDDO

Patrick
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform