SQLSTATE Values and Generic Error Codes
How Error Code Mapping Works
Error code mapping works as follows:
• Proprietary error codes - Each host DBMS returns a set of proprietary error codes. These error codes are unique to the DBMS and therefore not useful for developing portable applications. Enterprise Access products map proprietary error codes to generic error codes. This is a many-to-one mapping: many proprietary error codes may map to a single generic error code. For details about proprietary error codes, see your host DBMS documentation.
• Generic error codes - Enterprise Access products return a consistent set of errors. To enable your application to interact with different host DBMS (through Enterprise Access products), your applications should check generic error codes.
• SQLSTATE - SQLSTATE is the ANSI standard error variable for returning errors to applications. If you are developing ANSI-compliant applications, your application should check SQLSTATE. The mapping of generic errors to the SQLSTATE is many-to-one: many generic errors may map to a single SQLSTATE value.