|
|
Question : SqlConnection Broken Notification
|
|
Is it possible to get a notification of some sort from the SqlConnection class if the connection is broken in any way? This includes being broken from a server restart or say a manual kill of the connection process.
|
Answer : SqlConnection Broken Notification
|
|
I agree with Jim, It is not a better solution to discard SqlConnection Pool. But specially in web environment. If it is a desktop application you can prefer a static variable for connection. But even in this case you might use connection pool. Because in connection pool you can define your min and max open connection to the server. Just by setting in connection string. And to be aware of broken connections, you can handle it by using a timer in a static class. Then you can query a sysdate from db which wont bring overload to the db. If exception occurs, you can raise an event.
|
|
|
|