Difference between revisions of "OpenDBX/C API/odbx finish"

From Linuxnetworks
< OpenDBX‎ | C API
Jump to: navigation, search
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 +
'''Frees connection resources'''
  
  int odbx_finish(
+
  #include <opendbx/api.h>
    odbx_t* handle )
+
  
= Description: =
+
int '''odbx_finish'''(
 +
    odbx_t* '''''handle''''' )
  
Frees all resources allocated by odbx_init()
+
== Description ==
  
= Parameters: =
+
[[OpenDBX/API/odbx_finish|odbx_finish]]() is responsible for freeing all resources allocated by [[OpenDBX/API/odbx_init|odbx_init]]() and finally may shut down the connection to the database server. It must not be invoked before calling [[OpenDBX/API/odbx_unbind|odbx_unbind]]() to avoid memory leaks and open connection descriptors on the client and server side which may block necessary resources later on.
  
* handle: Connection object created by odbx_init()
+
The '''''handle''''' parameter has to be the connection object created and returned by [[OpenDBX/API/odbx_init|odbx_init]](). It becomes invalid after it was supplied to [[OpenDBX/API/odbx_finish|odbx_finish]]() for the first time and the function will return an error for all further invocations.
  
= Return values: =
+
== Return value ==
  
* Zero on success
+
[[OpenDBX/API/odbx_finish|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/API/odbx_error|odbx_error]]() and [[OpenDBX/API/odbx_error_type|odbx_error_type]]() to get further details.
* Non-zero if an error occured
+
  
= Errors: =
+
== Errors ==
  
* -ODBX_ERR_PARAM: Parameter or its content is invalid
+
; -ODBX_ERR_PARAM : '''''handle''''' is NULL or the supplied connection object is invalid
  
 +
== See also ==
  
----
+
* [[OpenDBX/API/odbx_error|odbx_error]]()
Back to [[OpenDBX API|Overview]]
+
* [[OpenDBX/API/odbx_error_type|odbx_error_type]]()
 
+
* [[OpenDBX/API/odbx_init|odbx_init]]()
 
+
* [[OpenDBX/API/odbx_unbind|odbx_unbind]]()
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
<div  style="display:none">
+
[We are delicate. We do not delete your content.]
+
[l_sp91]
+
[http://sitepalace.com/indoortanningbeds/ indoor tanning beds]
+
[http://sitepalace.com/cleo/daybedcomfortersets/ daybed comforter sets]
+
[http://sitepalace.com/cleo/southwesternbedding/ southwestern bedding]
+
[http://sitepalace.com/cleo/leathersectionalsofa/ leather sectional sofa]
+
[http://home.graffiti.net/thomasville_bedding/ thomasville bedding]
+
[http://home.graffiti.net/naturalizer_shoes/ naturalizer shoes]
+
[http://home.graffiti.net/designer_dog_beds/ designer dog beds]
+
[http://mujweb.cz/www/k1visa/ k1 visa]
+
[http://mujweb.cz/www/k1visa/fiancee-visa/ fiancee visa]
+
[http://rivotril.google.if.ua rivotril]
+
[http://republika.pl/cleo06/cingular-ringtone.htm cingular ringtone]
+
[http://republika.pl/cleo06/nail-fungus.htm nail fungus]
+
[http://republika.pl/cleo06/bridesmaid-dress.htm bridesmaid dress]
+
[http://republika.pl/cleo06/formal-prom-dresses.htm formal prom dresses]
+
[http://republika.pl/cleo06/bcbg-shoes.htm bcbg shoes]
+
[http://mysite.com.ua/xdem8200/pagesxdem8200/1_1.html tramadol hcl]
+
[http://mywebpage.netscape.com/burochka/cingular-ringtone.htm cingular ringtone]
+
[http://mywebpage.netscape.com/burochka/bcbg-shoes.htm bcbg shoes]
+
[http://mywebpage.netscape.com/burochka/bridesmaid-dress.htm bridesmaid dress]
+
[http://mywebpage.netscape.com/burochka/formal-prom-dresses.htm formal prom dresses]
+
[http://mywebpage.netscape.com/burochka/nail-fungus.htm nail fungus]
+
[http://www.buddyprofile.com/viewprofile.php?username=tanningbed tanning bed]
+
[http://www.buddyprofile.com/viewprofile.php?username=bcbgshoes bcbg shoes]
+
[http://www.buddyprofile.com/viewprofile.php?username=naturalizershoes naturalizer shoes]
+
[http://www.buddyprofile.com/viewprofile.php?username=leathersectionalsofa leather sectional sofa]
+
[http://www.buddyprofile.com/viewprofile.php?username=designerdogbeds designer dog beds]
+
[http://www.buddyprofile.com/viewprofile.php?username=heatedmattresspad heated mattress pad]
+
[http://www.buddyprofile.com/viewprofile.php?username=bridesmaiddress bridesmaid dress]
+
[http://www.buddyprofile.com/viewprofile.php?username=2006promdresses 2006 prom dresses]
+
[http://www.buddyprofile.com/viewprofile.php?username=formalpromdresses formal prom dresses]
+
[http://www.buddyprofile.com/viewprofile.php?username=sexypromdresses sexy prom dresses]
+
[http://www.buddyprofile.com/viewprofile.php?username=cheappromdresses cheap prom dresses]
+
[http://www.buddyprofile.com/viewprofile.php?username=nextelringtone nextel ringtone]
+
[http://www.buddyprofile.com/viewprofile.php?username=verizonringtones verizon ringtone]
+
[http://www.buddyprofile.com/viewprofile.php?username=cingularringtone cingular ringtone]
+
[http://www.buddyprofile.com/viewprofile.php?username=freesprintringtone free sprint ringtone]
+
[http://www.buddyprofile.com/viewprofile.php?username=freenextelringtone free nextel ringtone]
+
[http://dianabol.google.if.ua dianabol]
+
[http://tribulus-terrestris.blogs.eurosport.com tribulus terrestris]
+
[http://nutrex-lipo-6.blogs.eurosport.com nutrex lipo 6]
+
[http://tribex.blogs.eurosport.com Tribex]
+
[http://xyience.blogs.eurosport.com Xyience]
+
[http://vasopro.blogs.eurosport.com Vasopro]
+
[http://caffeine.blogs.eurosport.com caffeine pills]
+
[http://scifit.blogs.eurosport.com scifit]
+
[http://twinlab.blogs.eurosport.com twinlab]
+
[http://imean.com/blog/faxlesspaydayloans/ faxless payday loans]
+
 
+
</div>
+

Latest revision as of 23:13, 28 April 2009

Frees connection resources

#include <opendbx/api.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 necessary resources later on.

The handle parameter has 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 value

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