Subject RE: [firebird-support] about: how to detect if firebirdsql is running on server
Author Joao Carlos
hello Alan,
i already tested your solution:
1- using TCP Stack or TELNET i can't validate if the server is a FirebirdSQL
server even if the (3050) TCP port is active;
2- using try/except block, (FBClient/GDS32) can HALT my application

i need a SAFE test condition before the user starts using application...

ex: send a block of information to firebird server TCP port, and receive an
answer from the server...






best regards,

João Carlos



_____

De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com]
Em nome de Alan McDonald
Enviada: quinta-feira, 30 de Novembro de 2006 10:30
Para: firebird-support@yahoogroups.com
Assunto: RE: [firebird-support] about: how to detect if firebirdsql is running
on server



> 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






[Non-text portions of this message have been removed]