odbx_lo_close(3)

NAME
odbx_lo_close - Closes a large object reference

SYNOPSIS
\FC#include <opendbx/api.h>\F[]

\FCint odbx_lo_close\F[]
\FC(odbx_lo_t* lo);\F[]

DESCRIPTION
This function commits any changes made by \FCodbx_lo_write\F[]() and closes the open large object handle. To ommit calling this function on open large object handles will result in memory leaks as the data structure and dependent memory aren't freed.

The \FClo\F[] parameter has to be the large object handle created and returned by \FCodbx_lo_open\F[]() via its second parameter. It becomes invalid after it was supplied to \FCodbx_lo_close\F[]() and this function will return an error in this case.

RETURN VALUE
\FCodbx_lo_close\F[]() returns \FCODBX_ERR_SUCCESS\F[], 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 error section and they can be feed to \FCodbx_error\F[]() and \FCodbx_error_type\F[]() to get further details.

ERRORS

-\FCODBX_ERR_BACKEND\F[]
    The native database library couldn't close the large object successfully

-\FCODBX_ERR_HANDLE\F[]
    \FClo\F[] is NULL or the supplied large object handle is invalid

SEE ALSO
\FCodbx_lo_open\F[]()