Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check if Server is ON (Lantastic)

Status
Not open for further replies.

biliana

Programmer
Sep 27, 2001
4
CY
From the DOS client (running Lantastic) I would like to know when servers goes down. (Server is WinNT running also Lantastic). I tried all possible ways and tools (CHKDRV, IsDrive and similar) and looks like the information that network drive exist still exist after server goes down. Then writinig or reading that drive takes us to "Abort, Fail Retry message and program is crushing. Does anybody knows good utility that can recognize when servers is ON or OFF?
 
Baliana,
You should direct this question at the OS or Networking forums. This forum is for FoxPro questions, and probably won't get much response here...
Thanks,
-Scott

Please let me know if this has helped! s-)
 
Thank you for reply, but I need to do it inside Foxpro program. Before doing any database synchronization I need to check if Server is connected and drive available. If server is OFF the sync will not be performed. So it is Foxpro question. How to know if server is connected or no?
 
Try using the FILE() function to check for the existence of a known file. It should work o.k. without an error if the drive isn't there/disconnected.

IF FILE("F:\DATA\DRIVETST.TXT")
*... file is seen, continue
ELSE
*... file NOT seen, perform error routine
ENDIF

Dave S.
 
Thank you Dave :)
I tried that first. DOS station is getting connect while server is ON, file is seen. Then I shutdown server while the DOS station was still ON and tried again. I got the message: "Cannot locate network name reading drive F Abort, Retry, Fail?" after typing "A" for Abort the result is negative (file is not seen). How I can avoid Abort, Retry, Fail message?
 
Sorry, I wasn't paying attention. I thought you were using Fox Win. I'm not sure about dealing with it in DOS. My immediate thought, without knowing what is available, would be to try calling a small batch file within Fox aong these lines:

Within Fox:
!C:\DRVTEST.BAT
IF FILE("C:\isthere.tmp")
ERASE C:\isthere.tmp &&... delete for next time
*... continue processing...
ELSE
*... not there, perform error routine
ENDIF


Contents of DRVTEST.BAT:
@ECHO OFF
IF EXIST F:\DATA\DRVTEST.TXT GOTO ok
GOTO done
:eek:k
ECHO Is there > C:\isthere.tmp
:done

I'm not sure if you will get the Abort, Retry error or not. Win NT might see there is no current drive/file and let you get away with just testing for the file without erroring.

Dave S.
 
Thanks for you try and yes I still get Abort, Retry, Fail error hmmm
 
UNCLE!!!

Sorry, I'm out of ideas. Hopefully someone else has an idea.

Dave S.
 
To Check to see if the network is still going..

I look for a file.. see if I can open it on the network
drive... and have on the

ON ERROR (do the bit for no network)... on my
version, I had the app hooked into the autoexec.bat
and call nibble.bat if the network failed... I changed
the batch file to... reboot... etc etc... (reboots until
it is reconnected to the network).... cool huh! :)

way to get around this... abort, retry fail message...
is

hopefully....

in your config.sys

SHELL=C:\DOS\COMMAND.COM /P /E:1024 /F

I think it is the /F that avoids the Abort etc etc....
will bounce though them... (3 times... bang bang bang)..
and app keeps running :)

is an undocumented dos feature works 5.0 to 6.22

Dosen't work with Client32 (trys to be too smart & reconnecting on it's own back)...

... but works with VLM's... (small and stupid(fast) netware client) having to use all this for our comm's clients (dial in)....


Hope that helps

Zim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top