DbException.SqlState Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
For database providers which support it, contains a standard SQL 5-character return code indicating the success or failure of the database operation. The first 2 characters represent the class of the return code (e.g. error, success), while the last 3 characters represent the subclass, allowing detection of error scenarios in a database-portable way.
For database providers which don't support it, or for inapplicable error scenarios, contains null
.
public:
virtual property System::String ^ SqlState { System::String ^ get(); };
public virtual string? SqlState { get; }
member this.SqlState : string
Public Overridable ReadOnly Property SqlState As String
Property Value
A standard SQL 5-character return code, or null
.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for