|
-
October 2nd, 2001, 02:00 PM
#1
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!
-
October 2nd, 2001, 02:14 PM
#2
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]
-
October 2nd, 2001, 02:15 PM
#3
Re: How to detect a broken connection?
Of course this was my first idea.. but the connection state is still Opened..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|