Database Independent Abstraction Layer for C: libdbi Programmer's Guide | ||
---|---|---|
Prev | Chapter 4. Error Handling | Next |
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
value | description |
---|---|
DBI_ERROR_USER | This indicates an error status set by the application itself, see dbi_conn_set_error |
DBI_ERROR_BADOBJECT | invalid connection or result structure |
DBI_ERROR_BADTYPE | the accessor function does not match the actual column type |
DBI_ERROR_BADIDX | out-of-range index |
DBI_ERROR_BADNAME | incorrect column or option name |
DBI_ERROR_UNSUPPORTED | feature not supported by driver |
DBI_ERROR_NOCONN | no valid connection |
DBI_ERROR_NOMEM | out of memory |
DBI_ERROR_BADPTR | invalid pointer |
DBI_ERROR_NONE | no error occurred |
DBI_ERROR_CLIENT | client library error |