SqlError
Collects information relevant to a warning or error returned by SQL Server.
Gets the severity level of the error returned from SQL Server.
Gets the line number within the Transact-SQL command batch or stored procedure that contains the error.
Gets the text describing the error.
Gets a number that identifies the type of error.
Gets the name of the stored procedure or remote procedure call (RPC) that generated the error.
Gets the name of the instance of SQL Server that generated the error.
Gets the name of the provider that generated the error.
Some error messages can be raised at multiple points in the code for the Database Engine. For example, an 1105 error can be raised for several different conditions. Each specific condition that raises an error assigns a unique state code.