Subject RE: [firebird-support] about: how to detect if firebirdsql is running on server
Author Alan McDonald
> hello,
> i need to know if it is possible to detect if firebirdsql is
> running on server
> without get an error message...
> (my problem at this momento is that i get an error on login, and i need to
> find a new detection method...)
>
> is it possible to create a TCP connection to the server, to verify if
> firebirdsql is present and running? (whithout using fbclient.dll
> or gds32.dll)
>
> NOTE: i am using Delphi5
>
> thanks in advanced for any help,
>
>
>
> best regards,
>
> João Carlos

you can ping the server: exception means your address is wrong or the server
isn't on the network or the server has a TCP stack which prevents ping
response.
you can telnet on 3050: if ping success or failed, exception means firebird
not installed, or not running, or running on alternate port - you could then
scan a wide range or ports... hmmm.
Using a try/except block on the connection attempt takes longer than a
successful ping/telnet cycle if there is, in fact, an exception but the
client library will provide a more useful/meaning exception message.
your choice
Alan