SqlError::State Property
.NET Framework (current version)
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.
Assembly: System.Data (in System.Data.dll)
State is only set for errors that are received from the server.
For more information on errors generated by SQL Server, see Understanding Database Engine Errors.
The following example displays each SqlError within the SqlErrorCollection collection.
.NET Framework
Available since 1.1
Available since 1.1
Show: