Re: detect disconnected Database by ADO



Thanks, that works...

I saw that it is possible to do a sqlpinf (ie scan the UDP 1434 port to see
if a sqlserver is in listening).

"Stephen Howe" <stephenPOINThoweATtns-globalPOINTcom> wrote in message
news:%23fAOZjZ6HHA.5980@xxxxxxxxxxxxxxxxxxxxxxx
Is-it possible to know the ADO connection state of a Database
(_ConnectionPtr) ?
The property State give the previous command state.
Is there a method to know the connection state (synchronous) ? (for
example to know if the database is down , or the server is unavailable,
...)

Do a Connection Execute of "SELECT 1" and see what the Status is
afterwards.
It is the cheapest round-trip SELECT.

Stephen Howe



.