Error token

An Error packet is sent by the server if it encountered an error while processing a SQL command or stored procedure.


Properties

byte tokenType: the type code for this token (0xAA).

String tokenTypeName: the name corresponding to this token's type ("Error").

int errorNumber: the error number. More documentation at the Microsoft site. Error messages can also be looked up in the sys.messages view.

byte errorState: the error state. More documentation at the Microsoft site.

byte errorClass: the error class, which corresponds to the severity in the sys.messages view.

String message: the text of the error.

String serverName: the name of the server that encountered the error.

String procedureName: the name of the stored procedure that caused the error, if relevant.

int lineNumber: the line number where the error occurred.