Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to find whether a workstation is connected??
Message
 
 
To
16/06/1999 00:15:42
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00230282
Message ID:
00230335
Views:
26
The quickest workaround to this issue is to attempt to change directory to the mapped volume and to use some in-line error trapping. If an error occurs, you know that you are no longer have access to that volume.

This is another case where events can make your life easer. Alternatively, why not create a custom property with an access method. The access method can contain the code to actually attempt to change directories. If everything is successful, the property will evaluate to .T..


>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
Previous
Reply
Map
View

Click here to load this message in the networking platform