阅读背景:

确定SqlException是否是由网络问题引起的

来源:互联网 

I need to be able to test whether a System.Data.SqlClient.SqlException is due to a network error or not (.NET environment connecting to MS SQL Server). If it is, I can tell the user that there is a problem with his connection, whereas if it is not, it is most likely a bug in my code which is to be treated differently. Obviously, it is crucial not to have false positives (declare somehting a network problem when it is a bug).I need to be able to test whether a System.Data




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: