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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement