Gets the error state number returned from the SQL Server adapter.
[Visual Basic] Public ReadOnly Property State As Byte [C#] public byte State {get;} [C++] public: __property unsigned char get_State(); [JScript] public function get State() : Byte;
The error state, which identifies the source from which the error was issued (if the error can be issued from more than one place).
The following example returns the error state.
[Visual Basic]
Function GetErrorState(sqlErr As SQLError) As Byte GetErrorState = sqlErr.State End Function
SQLError Class | SQLError Members | System.Data.SQL Namespace | Number | Source | Class | Server | Message | Procedure | LineNumber