Incorect ADO connection status after network connection fail.

Incorect ADO connection status after network connection fail.

Post by WmF6YSBUdX » Fri, 18 Jan 2008 15:10:00


Hi
I'm use ADO 2.7 and have the problem to get ADO connection status. When
network connection failes the true status of the ADO connection is still on.
How can I get real state of ADO connection?
Any help would be greatly appreatiate.

Zaza
 
 
 

Incorect ADO connection status after network connection fail.

Post by Ralp » Fri, 18 Jan 2008 19:01:02


"Zaza Turmanidze" < XXXX@XXXXX.COM > wrote in

on.

No way except to try the connection and see if it fails.

Depending on the database server you might come up with some kind of 'ping'
or 'watchdog' timer process.

But IMHO this is often of little use. The best solution is to managing your
program to catch expections and deal with them at that time.

-ralph

 
 
 

Incorect ADO connection status after network connection fail.

Post by Stephen Ho » Fri, 18 Jan 2008 21:42:01

Do a Connection Execute of

"SELECT 1"

Cheapest round-trip select to the database.
If the connection has died, the status will be updated

Stephen Howe