.NET Framework Class Library
SqlException Members
The exception that is thrown when SQL Server returns a warning or error. This class cannot be inherited.
The following tables list the members exposed by the SqlException type.
Public Properties(see also Protected Properties )
Top
| Name | Description | |
|---|---|---|
|
Class | Gets the severity level of the error returned from the .NET Framework Data Provider for SQL Server. |
|
Data | Gets a collection of key/value pairs that provide additional, user-defined information about the exception.(Inherited from Exception.) |
|
ErrorCode | Gets the HRESULT of the error.(Inherited from ExternalException.) |
|
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. |
|
HelpLink | Gets or sets a link to the help file associated with this exception.(Inherited from Exception.) |
|
InnerException | Gets the Exception instance that caused the current exception.(Inherited from Exception.) |
|
LineNumber | Gets the line number within the Transact-SQL command batch or stored procedure that generated the error. |
|
Message | Gets a message that describes the current exception.(Inherited from Exception.) |
|
Number | Gets a number that identifies the type of error. |
|
Procedure | Gets the name of the stored procedure or remote procedure call (RPC) that generated the error. |
|
Server | Gets the name of the computer that is running an instance of SQL Server that generated the error. |
|
Source | Overridden. Gets the name of the provider that generated the error. |
|
StackTrace | Gets a string representation of the frames on the call stack at the time the current exception was thrown.(Inherited from Exception.) |
|
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. |
|
TargetSite | Gets the method that throws the current exception.(Inherited from Exception.) |
Public Methods(see also Protected Methods )
Top
| Name | Description | |
|---|---|---|
|
Equals | Overloaded. Determines whether two Object instances are equal. (Inherited from Object.) |
|
GetBaseException | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Inherited from Exception.) |
|
GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.) |
|
GetObjectData | Overridden. Sets the SerializationInfo with information about the exception. |
|
GetType | Gets the runtime type of the current instance. (Inherited from Exception.) |
|
ReferenceEquals | Determines whether the specified Object instances are the same instance. (Inherited from Object.) |
|
ToString | Creates and returns a string representation of the current exception. (Inherited from Exception.) |
Protected Methods| Name | Description | |
|---|---|---|
|
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
|
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
浙公网安备 33010602011771号