odbx_unbind(3)
π odbx_unbind(3) β the OpenDBX glow-up page π
okay bestie, so this is odbx_unbind, one of the OpenDBX crew, and it's literally the "we're breaking up (with the database)" function. Let's get into it β¨
πΈ NAME πΈ
odbx_unbind β disconnects from the database. that's it. that's the whole vibe. bye-bye connection π«Ά
π¦ SYNOPSIS π¦
#include <opendbx/api.h>
int odbx_unbind (odbx_t* handle);
π DESCRIPTION π
okay so picture this: you already used odbx_bind() to tie your connection object to a database and a user, and now you want out. odbx_unbind() releases that binding on the connection object you hand it. it's giving "we need to see other databases" π
why would you even want this? iconic reasons, honestly:
- you're switching to a different database π
- you're binding to the same database but with different credentials π
- you want to set some new connection related options before rebinding to the database server β¨
heads up, firebird besties π¦ β if there's an open transaction while this function runs in the firebird backend, it gets committed to the database and closed. the behavior of the other backends with open transactions may vary, so likeβ¦ don't assume, okay? π
the way that you MUST process all result sets returned by the database server before using this functionβ¦ no seriously, you have to. otherwise it might return an error, depending on the native database client library and the backend module. so finish your result sets first, bestie, i'm begging π
and this function must be invoked before calling odbx_finish() β otherwise you get memory leaks and connections left open which may block necessary resources later on. not the resource-blocking arc, we're not doing that π
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(), and in that case odbx_unbind() will return an error. so yeah, after odbx_finish() she's gone, don't come calling π
β¨ RETURN VALUE β¨
odbx_unbind() returns ODBX_ERR_SUCCESS, or an error code whose value is less than zero if one of the operations couldn't be completed successfully π¬
possible error codes are listed in the ERRORS section (right below, keep scrolling babe), and you can feed them to odbx_error() and odbx_error_type() to get further details π
π₯ ERRORS π₯
-ODBX_ERR_PARAMβhandleisNULL, or the supplied connection object is invalid π«
π SEE ALSO π
odbx_bind()odbx_error()odbx_finish()
go read those too, iykyk π
kay that's the whole page, mwah π β this has been odbx_unbind(3) from OpenDBX, dated 6 February 2026. slay, stay bound (until you unbind), and don't forget to odbx_finish() π§ββοΈπ
π¦ where this page comes from
- ubuntu resolute: libopendbx1-dev 1.4.6-18build2
- ubuntu stonking: libopendbx1-dev 1.4.6-18build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms