1odbx_unbind(3)                      OpenDBX                     odbx_unbind(3)
2
3
4

NAME

6       odbx_unbind - Disconnects from the database
7

SYNOPSIS

9       #include <opendbx/api.h>
10
11
12       int odbx_unbind (odbx_t* handle);
13

DESCRIPTION

15       Releases the binding of the connection to the database and user associ‐
16       ated by odbx_bind() to the supplied connection object. This  is  useful
17       for  switching  to a different database or binding to the database with
18       different credentials. It is also possible to set new connection relat‐
19       ed options before rebinding to the database server. If an open transac‐
20       tion exists while this function is executed in the firebird backend, it
21       will be committed to the database and closed. The behavior of the other
22       backends for open transactions may vary.
23
24       It's necessary to process all result  sets  returned  by  the  database
25       server  before using this function. Otherwise, it might return an error
26       depending on the native database client library and the backend module.
27       This  function  must  be  invoked before calling odbx_finish() to avoid
28       memory leaks and connections left open which may  block  necessary  re‐
29       sources later on.
30
31       The  handle  parameter  has to be the connection object created and re‐
32       turned by odbx_init(). It becomes invalid  after  it  was  supplied  to
33       odbx_finish() and odbx_unbind() will return an error in this case.
34

RETURN VALUE

36       odbx_unbind() returns ODBX_ERR_SUCCESS, or an error code whose value is
37       less than zero if one of the operations couldn't be completed  success‐
38       fully.  Possible  error  codes are listed in the error section and they
39       can be feed to odbx_error() and odbx_error_type() to  get  further  de‐
40       tails.
41

ERRORS

43       -ODBX_ERR_PARAM
44              handle is NULL or the supplied connection object is invalid
45

SEE ALSO

47       odbx_bind(), odbx_error(), odbx_finish()
48
49
50
51                                 25 July 2019                   odbx_unbind(3)
Impressum