General information
Title:
How to detect broken connection
Environment versions
Network:
Windows 2003 Server
A client reports sporadic messages indicating that the connection to the SQL database has been lost. This happens after they have had the application minimized for a period of time. Upon returning to the application, the user receives a connectivity error where the only options are Cancel, Ignore and Help -- none of which allow them to continue with the application. I suspect this may be related to the "KeepAlive" feature in SQL 2005. What is the best way to detect this situation and recover from it? Every method I've tried to test the connection just generates a SQL error--regardless of how Display Warnings has been set. The application has a shared connection used by remote views and SPT and is aware of the statement handle as well the connect string used to create it.
It would seem that if SQL detects inactivity and idles (or breaks) the connection, it ought to be able to detect renewed activity and enable it--but that would be too easy :-)
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only