Returns a human readable error message
\*(T<#include <opendbx/api.h>\*(T>
\*(T<char* odbx_error\*(T> \kx \*(T<(odbx_t* handle, int error);\*(T>
\*(T<odbx_error\*(T>() returns an error string corresponding to the supplied error code or the error string generated by the native database library. Error strings originating from the backend modules or the native database client libraries are cleared as soon as the next odbx_*() function is called. All error strings are statically allocated and must not be changed or freed. If the OpenDBX library is compiled with native language support and the user environment variables are set accordingly to a supported language, strings which are part of the OpenDBX library are translated before being returned. This may also be the case for strings returned by the native database libraries but depends on their support.
The first parameter \*(T<handle\*(T> is the connection object created and returned by \*(T<odbx_init\*(T>() which becomes invalid as soon as it was supplied to \*(T<odbx_finish\*(T>(). Anyhow, it isn't necessary to supply a valid handle for errors which use error codes not equal to -\*(T<ODBX_ERR_BACKEND\*(T> because they are returned directly from a static error message array. Therefore, it's possible to use \*(T<odbx_error\*(T>() even if \*(T<odbx_init\*(T>() wasn't successful. If -\*(T<ODBX_ERR_BACKEND\*(T> is supplied in this case nevertheless, the return error string will be the same as for an invalid handle.
Almost all OpenDBX library functions return an \*(T<error\*(T> code if one of the operations couldn't be completed successfully. The codes returned use values less than zero to indicate different kind of errors and these values can be directly passed to \*(T<odbx_error\*(T>() to obtain the corresponding zero-terminated error string.
\*(T<odbx_error\*(T>() returns a zero-terminated string suitable for being displayed to the user of the application.
If an backend error occurred and \*(T<handle\*(T> is NULL or the supplied connection object is invalid, \*(T<odbx_error\*(T>() returns the localized string for -\*(T<ODBX_ERR_PARAM\*(T>.
\*(T<odbx_error_type\*(T>(), \*(T<odbx_init\*(T>()