What error numbers can be returned by SqlCommand.ExecuteXXX() when timeout occures
I need to handle timeouts when executing SQL s开发者_如何学运维tatements in C#. For handling deadlocks I would look for error code 1205. I am wondering what error codes I need to look at when looking for timeouts. Querying the messages table of SQLServer for error messages containing the term 'timeout' I get beck somewhat around 30 records. Which of those are relevant for SqlCommand.ExecuteXXX()?
Timeout is -2: it doesn't come from SQL Server itself but your client drivers.
精彩评论