Check for server

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
PeterParker
Posts: 5
Joined: Mon 08 Jan 2007 00:14

Check for server

Post by PeterParker » Thu 11 Jan 2007 01:53

I have an application that will not always be connected to the network, and I would like to know if there is a better way to check for the server's availability.

Currently, I am doing a TMSConnection.open. But the delay on failure is horrible.

Anything else I should do?

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Fri 12 Jan 2007 11:31

OLE DB API does not provide functionality to check if SQL server exists
except a connection attempt. You can try to ping the computer you want to
connect to by Indy components to check if it exists in your network.
Try to decrease value of the TMSConnection.ConnectionTimeout property.

PeterParker
Posts: 5
Joined: Mon 08 Jan 2007 00:14

Indy

Post by PeterParker » Fri 12 Jan 2007 14:44

I guess Indy was always a fall back. Thanks for the info.

Post Reply