Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Users on a system
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00114314
Message ID:
00115616
Vues:
14
>We tried this, and found that there was a 5-20 minute wait for the record to be unlocked when we simulated a crash by pulling the plug on the computer. On a couple of occasions, we had to use Network Utilities to unlock a record.
>
>Not acceptable to users, so we went with other methods.

Yeap ... that's Windows !!! You probably use the NetBEUI protocol, Barbara ! With TCP/IP, you would need to wait for 2 or 3 minutes max, which is already better, but still unacceptable for the users. In fact, Windows tries several methods for reaching the target computer and it does this synchronously (but this deserves further explanantion as I am not a network specialist).

I have tried multiple methods to get the fastest and accurate answer, and the only one I was able to trust uses a mechanism called "Directory Notification".

A simple call to FILE( ... ) wouldn't work ! For example the following code cannot be trusted :

? FILE( "\\BLUEBLUE\MYDIR\MYFILE.TXT" )

On our 10 Mbit network, it takes 11 seconds to return with .T. while the BLUEBLUE machine does not even exist !

The Directory Notification mechanism works like a charm, but still needs 11 seconds to complete when the network resource cannot be found anymore.

What we use is :

nHandle = NOT_set( "\\BLUEBLUE\MYDIR\MYFILE.TXT","",.F.,8 )

IF ( nHandle == -1 )
? "No network anymore"
ELSE
NOT_kill( nHandle )
ENDIF

Of course, network problems are few but in the case there is one, we're blocked in our procedure for 11 seconds. Please notice that NOT_*() functions are to be found in FOCUS.FLL.

I don't know if that helps Barbara.

Pat
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform