Check for exceptions with SQLSTATE
After an SQL statement executes, the SQLSTATE value
can indicate one of the four conditions that the following table shows.
Exception condition | SQLSTATE value |
---|---|
Success | "00000" |
Success, but no rows found | "02000" |
Success, but warnings generated | Class code = "01" Subclass code = "000" to "006" (for ANSI and X/Open warnings) Subclass code = "I01" to "I11" (for warnings specific to HCL OneDB™) Subclass code = "U01" (for user-defined warnings) |
Failure, runtime error generated | Class code > "02" (for ANSI and X/Open errors) Class code = "IX" (for warnings specific to HCL OneDB) Class code = "U0" (for user-defined errors) |