Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to find whether a workstation is connected??
Message
From
16/06/1999 00:15:42
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
How to find whether a workstation is connected??
Miscellaneous
Thread ID:
00230282
Message ID:
00230282
Views:
59
I have this app running on an NT server.On it is a timer class that runs every 10 seconds with code in it. This code has only one purpose and that is to update the master database on the server with data from the workstation. I did this so that in the event of the WS going down the app on the server could still run and data from the WS entered manually. This was to avoid down time on the server just because the WS went down.

To ensure the WS is online I read a path to its data files from a config DBF with a virtual path and not a mapped path.

So even if the WS is mapped as g:\, I use the path \\workstation1\DATA\ as I found this to be faster and more reliable.
To find if the WS is actually running, the timer checks for the data file using code

IF FILE(DataPath+"WSTABLE.DBF")
DO update code
ELSE
Do not update
ENDIF

This happens every time the timer fires, so that even if the WS was offline, when it does come online, FILE() will pick it up.

All this works fine but when the WS actually goes down, The FILE() takes ever so long to return an .F. and slows the main app down terribly.

Is there any other way to check if a WS is online so that the update can be done without the server slowing down when the WS goes offline??
This defeats the purpose.

Any suggestions??

Bernard
Next
Reply
Map
View

Click here to load this message in the networking platform