b001
asked on
Check if WAN machine is online before connecting
Hi Expert
I use the following code to connect to a server on WAN using ipaddress.
lcStr = "Driver={SQL SERVER};Server=&SERVERIP;D atabase=Au to;UID=myn ame;pwd=my pass;Trust ed_Connect ion=no;"
lnHandle = Sqlstringconnect(lcStr)
If lnHandle>=1
lnResult = SQLExec(lnHandle, "SELECT * FROM loged ", "cOutData2")
endif
it works fine,but if the server is off line it takes a long time to come back.
Is there any way I can check this ipaddress machine is online before trying to get the information?
Thanks
I use the following code to connect to a server on WAN using ipaddress.
lcStr = "Driver={SQL SERVER};Server=&SERVERIP;D
lnHandle = Sqlstringconnect(lcStr)
If lnHandle>=1
lnResult = SQLExec(lnHandle, "SELECT * FROM loged ", "cOutData2")
endif
it works fine,but if the server is off line it takes a long time to come back.
Is there any way I can check this ipaddress machine is online before trying to get the information?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
but it also takes time when you are not connected...