Opens a large object in the database
\*(T<#include <opendbx/api.h>\*(T>
\*(T<int odbx_lo_open\*(T> \kx \*(T<(odbx_result_t* result, odbx_lo_t** lo, const char* value);\*(T>
Some database management systems store large amount of data in separate regions of the database and the content is only referenced by identifiers in the tables. The data types used for this are called Binary Large OBject (BLOB) and Character Large OBject (CLOB) and can be found in e.g. the Firebird and Oracle database servers. The OpenDBX library provides a large object interface to access, read and write their content via the "odbx_lo_*()" functions. To find out if large amount of data can be accessed directly or if the large object interface have to be used, \*(T<odbx_capabilities\*(T>() provides the answer when feed with the \*(T<ODBX_CAP_LO\*(T>
The \*(T<result\*(T> parameter has to be the result object created and returned by \*(T<odbx_result\*(T>(). It becomes invalid after it was supplied to \*(T<odbx_result_finish\*(T>() and this function will return an error in that case. The second parameter, the pointer to a \*(T<odbx_lo_t\*(T>*, will contain the newly created large object handle if \*(T<odbx_lo_open\*(T>() succeeds. The \*(T<lo\*(T> handle is necessary for all other functions of the large object interface so they are able to perform their operations on the referenced content. The last parameter must be the return value of \*(T<odbx_field_value\*(T>() but you have to check for \*(T<NULL\*(T> values before feeding the value to \*(T<odbx_lo_open\*(T>(). Otherwise, an error is returned.
\*(T<odbx_lo_open\*(T>() returns \*(T<ODBX_ERR_SUCCESS\*(T>, 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 \*(T<odbx_error\*(T>() and \*(T<odbx_error_type\*(T>() to get further details.
-\*(T<ODBX_ERR_BACKEND\*(T>
The native database library couldn't open the large object
-\*(T<ODBX_ERR_NOMEM\*(T>
Allocating additionally required memory failed
\*(T<odbx_capabilities\*(T>(), \*(T<odbx_field_value\*(T>(), \*(T<odbx_lo_close\*(T>(), \*(T<odbx_lo_read\*(T>(), \*(T<odbx_lo_write\*(T>(), \*(T<odbx_result\*(T>()