Subject Re: [firebird-support] Checking connection in advance to connecting
Author Helen Borrie
George,

At 09:43 AM 4/07/2005 +0000, you wrote:
>I am trying to run 24/7 in a distributed environment, and the network
>is not the best. I would like to be able to check availability of
>the server BEFORE attempting to connect.
>
>Previously I have used PING, but there are cases where I get a PING,
>but port 3500 isn't open (some vpn issue).
>
>I got an isc_service_attach to work, but there seem to be cases where
>in the throes of getting and losing connections that the server is
>somehow brought to its knees. I wouldn't doubt that trying an
>isc_service_attach every 5 seconds could be a little hard on the
>server.
>
>I have tried some IBO things, but those that I have found
>(VerifyConnection) are dependent on an existing connection to
>function.
>
>Any sort of neat firebird api utility for this? I am running FB1.5.

Well...yes...the API will return an exception if the server resource is not
available. Is there any reason why you can't put the call to IBO's Connect
method inside a try...except block and use this built-in facility? :-)

/heLen