Types of status variables

The following methods obtain diagnostic information about the outcome of an SQL statement:
  • Access the SQLSTATE variable, a five-character string that contains status values that conform to the ANSI and X/Open standards
  • Access the SQLCODE variable, an int4 integer that contains status values that are specific to HCL OneDB™

When you create applications that must conform to either the ANSI or X/Open standard, use the SQLSTATE variable as your primary exception-handling method.