Chapter 6: SQLSTATE Codes and Messages

This chapter describes Adaptive Server’s SQLSTATE status codes and their associated messages.

SQLSTATE codes are required for entry level SQL92 compliance. They provide diagnostic information about two types of conditions:

Each SQLSTATE code consists of a 2-character class followed by a 3-character subclass. The class specifies general information about error type. The subclass specifies more specific information.

SQLSTATE codes are stored in the sysmessages system table, along with the messages that display when these conditions are detected. Not all Adaptive Server error conditions are associated with a SQLSTATE code—only those mandated by SQL92. In some cases, multiple Adaptive Server error conditions are associated with a single SQLSTATE value.