How to catch SQLServer timeout exceptions

后端 未结 6 2058
轮回少年
轮回少年 2020-11-27 11:32

I need to specifically catch SQL server timeout exceptions so that they can be handled differently. I know I could catch the SqlException and then check if the message stri

6条回答
  •  甜味超标
    2020-11-27 12:01

    I am not sure but when we have execute time out or command time out The client sends an "ABORT" to SQL Server then simply abandons the query processing. No transaction is rolled back, no locks are released. to solve this problem I Remove transaction in Stored-procedure and use SQL Transaction in my .Net Code To manage sqlException

提交回复
热议问题