Difference between revisions of "OpenDBX/C API/odbx finish"
(description) |
(header hierarchy) |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | |||
'''#include <odbx.h>''' | '''#include <odbx.h>''' | ||
Line 6: | Line 5: | ||
odbx_t* '''handle''' ) | odbx_t* '''handle''' ) | ||
− | = Description = | + | == Description == |
'''odbx_finish()''' is responsible for freeing all resources allocated by [[OpenDBX_init|odbx_init()]] and finally may shut down the connection to the database server. It must not be invoked before calling [[OpenDBX_unbind|odbx_unbind()]] to avoid memory leaks and open connection descriptors on the client and server side which may block required resources later on. | '''odbx_finish()''' is responsible for freeing all resources allocated by [[OpenDBX_init|odbx_init()]] and finally may shut down the connection to the database server. It must not be invoked before calling [[OpenDBX_unbind|odbx_unbind()]] to avoid memory leaks and open connection descriptors on the client and server side which may block required resources later on. | ||
Line 12: | Line 11: | ||
The '''handle''' parameter have to be the connection object created and returned by [[OpenDBX_init|odbx_init()]]. It becomes invalid after it was supplied to '''odbx_finish()''' for the first time and the function will return an error for all further invocations. | The '''handle''' parameter have to be the connection object created and returned by [[OpenDBX_init|odbx_init()]]. It becomes invalid after it was supplied to '''odbx_finish()''' for the first time and the function will return an error for all further invocations. | ||
− | = Return values = | + | == Return values == |
'''odbx_finish()''' returns ODBX_ERR_SUCCESS, or an error code whose value is less than zero if '''handle''' 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 [[OpenDBX_error|odbx_error()]] and [[OpenDBX_error_type|odbx_error_type()]] to get further details. | '''odbx_finish()''' returns ODBX_ERR_SUCCESS, or an error code whose value is less than zero if '''handle''' 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 [[OpenDBX_error|odbx_error()]] and [[OpenDBX_error_type|odbx_error_type()]] to get further details. | ||
− | = Errors = | + | == Errors == |
; -ODBX_ERR_PARAM : '''handle''' is NULL or the supplied connection object is invalid | ; -ODBX_ERR_PARAM : '''handle''' is NULL or the supplied connection object is invalid | ||
− | = See also = | + | == See also == |
* [[OpenDBX_error]] | * [[OpenDBX_error]] |
Revision as of 18:39, 6 May 2007
#include <odbx.h> int odbx_finish( odbx_t* handle )
Description
odbx_finish() is responsible for freeing all resources allocated by odbx_init() and finally may shut down the connection to the database server. It must not be invoked before calling odbx_unbind() to avoid memory leaks and open connection descriptors on the client and server side which may block required resources later on.
The handle parameter have to be the connection object created and returned by odbx_init(). It becomes invalid after it was supplied to odbx_finish() for the first time and the function will return an error for all further invocations.
Return values
odbx_finish() returns ODBX_ERR_SUCCESS, or an error code whose value is less than zero if handle 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 odbx_error() and odbx_error_type() to get further details.
Errors
- -ODBX_ERR_PARAM
- handle is NULL or the supplied connection object is invalid
See also
Back to Overview