Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
=INKEY() problem?
Message
De
14/04/2003 11:08:44
 
 
À
12/04/2003 07:05:53
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00776833
Message ID:
00777219
Vues:
11
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform