4.2. Error numbers

dbi_conn_error returns DBI_ERROR_NONE (internally 0) if the last operation was successful, and a nonzero value if not. Client library errors use positive error numbers, whereas libdbi errors use negative error numbers as listed in the following table:

Table 4-1. libdbi error numbers

valuedescription
DBI_ERROR_USERThis indicates an error status set by the application itself, see dbi_conn_set_error
DBI_ERROR_BADOBJECTinvalid connection or result structure
DBI_ERROR_BADTYPEthe accessor function does not match the actual column type
DBI_ERROR_BADIDXout-of-range index
DBI_ERROR_BADNAMEincorrect column or option name
DBI_ERROR_UNSUPPORTEDfeature not supported by driver
DBI_ERROR_NOCONNno valid connection
DBI_ERROR_NOMEMout of memory
DBI_ERROR_BADPTRinvalid pointer
DBI_ERROR_NONEno error occurred
DBI_ERROR_CLIENTclient library error