How to detect a broken connection?
I have one question simple.
I have a service which checks a database for new entries and scan at 30 secs intervals. If I reboot the SQL Server, this service crashes, even if I have error handling.
My question is, is there a way to detect when the connection is OPENED that the server is not accessible and make it wait? I tought this was the connection timeout thing, but it doesn't seem it works when the connection is already established.
Thank you!
Re: How to detect a broken connection?
We can find if we have opened Db by the state of the connection object
adStateOpen
adStateClosed
adStateConnecting
for example:
If cnConnection.State = adStateOpen then
cnConnection.Close
else
msgbox "Connection is lost"
End If
set cnConnection = nothing
Iouri Boutchkine
[email protected]
Re: How to detect a broken connection?
Of course this was my first idea.. but the connection state is still Opened..