Reputation: 9193
We're getting these errors in an environment where I'd rather not drop code just to determine the SqlException's Number and ErrorCode. I'm trying to put in special exception handling for this error and don't want to do string parsing. Does anyone know what error number this is or have a link to an extensive list of errors with their numbers and error codes?
Upvotes: 1
Views: 1081
Reputation: 294367
SqlException
has the Errors
collection of SqlError
objects that each have a Number
and Message
. A list of SQL Server error codes, description and resolution is available at Cause and Resolution of Database Engine Errors (look at the list on the left side panel). In addition you also have to deal with SqlClient errors, like network connectivity errors, SSPI errors and other, including the 'transport-level error' you mention in your title.
Upvotes: 2