all groups > sql server connect > may 2007 >
You're in the

sql server connect

group:

Connection Broken


Connection Broken Michael Tissington
5/27/2007 5:29:28 AM
sql server connect: I have developed on application that connects to a sql database using tcp/ip

Sometimes the connection may get broken, for example with laptop users.

What is the most efficient way of detecting when this happens, instead of
the string of sql errors that we get.
Re: Connection Broken Jens
5/27/2007 10:00:03 AM
You either implement this through your own "sanity db class" with
sending a trivial command like "Select 'Sanity Check'" to SQL Server
and doing this in a try catch block, or you wrap the command you are
trying to send in a try catch block and retry upon the specific error
class for a lost connection.


Jens K. Suessmeyer.

---
http://www.sqlserver2005.de
---
Re: Connection Broken William (Bill) Vaughn
5/27/2007 12:34:16 PM
There are several Framework classes that can be called to see if the Network
changes state (which kills a connection) or you can use others to see if the
SQL Server instance is still responding. Yes, it sounds like there are
network hardware (or throughput/capacity) issues.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

[quoted text, click to view]

Re: Connection Broken Hari Prasad
5/27/2007 10:40:16 PM
Hello,

Mostly this should be because of some network issues. See if your network is
persistent..Run a ping from one of the laptop to sql server and redirect to
text file
and see if there is any request time-out..

Thanks
Hari

[quoted text, click to view]

AddThis Social Bookmark Button