NAME
odbx_finish - Frees connection resources
SYNOPSIS
FC#include <opendbx/api.h>F[0]
FCint odbx_finishF[0] FC(odbx_t* handle);F[0]
DESCRIPTION
FCodbx_finishF[0]() is responsible for freeing all resources allocated by FCodbx_initF[0]() and finally may shut down the connection to the database server. It must not be invoked before calling FCodbx_unbindF[0]() to avoid memory leaks and open connection descriptors on the client and server side which may block necessary resources later on.
The FChandleF[0] parameter has to be the connection object created and returned by FCodbx_initF[0](). It becomes invalid after it was supplied to FCodbx_finishF[0]() for the first time and the function will return an error for all further invocations.
RETURN VALUE
FCodbx_finishF[0]() returns FCODBX_ERR_SUCCESSF[0], or an error code whose value is less than zero if FChandleF[0] is invalid or one of the operations couldn't be completed successfully by the backend module. Possible error codes are listed in the error section and they can be feed to FCodbx_errorF[0]() and FCodbx_error_typeF[0]() to get further details.
ERRORS
- -FCODBX_ERR_PARAMF[0]
-
FChandleF[0] is NULL or the supplied connection object is invalid
SEE ALSO
FCodbx_errorF[0](), FCodbx_error_typeF[0](), FCodbx_initF[0](), FCodbx_unbindF[0]()