Export (0) Print
Expand All

SqlException Properties

The SqlException type exposes the following members.

  NameDescription
Public property Class Gets the severity level of the error returned from the .NET Framework Data Provider for SQL Server.
Public property Data Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from Exception.)
Public property ErrorCode Gets the HRESULT of the error. (Inherited from ExternalException.)
Public property Errors Gets a collection of one or more SqlError objects that give detailed information about exceptions generated by the .NET Framework Data Provider for SQL Server.
Public property HelpLink Gets or sets a link to the help file associated with this exception. (Inherited from Exception.)
Protected property HResult Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from Exception.)
Public property InnerException Gets the Exception instance that caused the current exception. (Inherited from Exception.)
Public property LineNumber Gets the line number within the Transact-SQL command batch or stored procedure that generated the error.
Public property Message Gets a message that describes the current exception. (Inherited from Exception.)
Public property Number Gets a number that identifies the type of error.
Public property Procedure Gets the name of the stored procedure or remote procedure call (RPC) that generated the error.
Public property Server Gets the name of the computer that is running an instance of SQL Server that generated the error.
Public property Source Gets the name of the provider that generated the error. (Overrides Exception.Source.)
Public property StackTrace Gets a string representation of the immediate frames on the call stack. (Inherited from Exception.)
Public property State Gets a numeric error code from SQL Server that represents an error, warning or "no data found" message. For more information about how to decode these values, see SQL Server Books Online.
Public property TargetSite Gets the method that throws the current exception. (Inherited from Exception.)
Top

Community Additions

ADD
Show:
© 2014 Microsoft