Page 1 of 1

does (internal) IP exist ?

Posted: Wed Feb 16, 2022 8:59 am
by AUGE_OHR
hi,

for SQL Server i need IP but what if SQL-Server is Offline :?:
it will "time-out" after a while but it "confuse" User when nothing happens

so i like to "check" it SQL-Server is Online.
i can use PING ... but i search for more "elegant" Solution :idea:

Re: does (internal) IP exist ?

Posted: Wed Feb 16, 2022 11:06 am
by fugazi
hi,

Try
_ret:=HB_PING(cUrl).

https://hmgforum.com/viewtopic.php?f=24 ... ing#p54129

Regards
Fugazi

Re: does (internal) IP exist ?

Posted: Wed Feb 16, 2022 2:01 pm
by Claudio Ricardo
Hi Jimmy
Precisely for that function and so that the program does not freeze while it checks, in another post I asked how to put it in another thread, considering that it is in a Timer every 60 seconds and only report if it returns <> 0.
But since no one answered, I think it can not be done.

Re: does (internal) IP exist ?

Posted: Wed Feb 16, 2022 3:22 pm
by AUGE_OHR
hi Claudio,

on Intranet it does respond very quick so i can use that Code as Function

Re: does (internal) IP exist ?

Posted: Wed Feb 16, 2022 5:41 pm
by Claudio Ricardo
Hi Jimmy
Sorry I forgot to say that it is for the internet connecting to a remote hosting and the problem occurs when
it does not establish a connection, it freezes the application for 10 - 20 seconds.
Although what I really want to learn is how to execute an independent function
(which can take time to complete, such as downloading an update file) I want it to do it in the background,
and on return show a MsgInfo notifying that an update is available, while the user continues to do other tasks.