-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How to trap a sql server connection state?
PostPosted: Thu Dec 06, 2007 10:12 am 
Newbie

Joined: Wed Nov 21, 2007 1:47 pm
Posts: 6
Hi,

I'v tried to ask questions before about how to trap a connection broken/lost exception from the Connections object on NHibernate ISession object but haven't really got any good answers.

I use the NHibernate Session Manager found in the Best Practises Basic example. This is found on the www.codeproject.com.

I want to notify the user of my application when the "SQL" server connection is lost or broken, and when its working.

The IDbConnection.State object holds this information, but when I disconnect my computer from the network, its still reports that the ConnectionState is Open, not Broken as it should.

Is there any other way to check the connection state.

Regards
Svein Thomas


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.