1odbx_lo_open(3)                     OpenDBX                    odbx_lo_open(3)
2
3
4

NAME

6       odbx_lo_open - Opens a large object in the database
7

SYNOPSIS

9       #include <opendbx/api.h>
10
11
12       int odbx_lo_open (odbx_result_t* result, odbx_lo_t** lo, const char*
13                        value);
14

DESCRIPTION

16       Some database management systems store large amount of data in separate
17       regions  of  the database and the content is only referenced by identi‐
18       fiers in the tables. The data types used for  this  are  called  Binary
19       Large  OBject (BLOB) and Character Large OBject (CLOB) and can be found
20       in e.g. the Firebird and Oracle database servers. The  OpenDBX  library
21       provides  a large object interface to access, read and write their con‐
22       tent via the "odbx_lo_*()" functions. To find out if  large  amount  of
23       data  can be accessed directly or if the large object interface have to
24       be used, odbx_capabilities() provides the answer  when  feed  with  the
25       ODBX_CAP_LO
26
27       The  result  parameter has to be the result object created and returned
28       by odbx_result(). It becomes invalid after it was supplied to  odbx_re‐
29       sult_finish()  and this function will return an error in that case. The
30       second parameter, the pointer to a odbx_lo_t*, will contain  the  newly
31       created  large  object handle if odbx_lo_open() succeeds. The lo handle
32       is necessary for all other functions of the large object  interface  so
33       they  are  able  to perform their operations on the referenced content.
34       The last parameter must be the return value of  odbx_field_value()  but
35       you  have  to  check  for  NULL  values  before  feeding  the  value to
36       odbx_lo_open(). Otherwise, an error is returned.
37

RETURN VALUE

39       odbx_lo_open() returns ODBX_ERR_SUCCESS, or an error code  whose  value
40       is  less  than zero if one of the operations couldn't be completed suc‐
41       cessfully. Possible error codes are listed in  the  error  section  and
42       they  can  be feed to odbx_error() and odbx_error_type() to get further
43       details.
44

ERRORS

46       -ODBX_ERR_BACKEND
47              The native database library couldn't open the large object
48
49       -ODBX_ERR_NOMEM
50              Allocating additionally required memory failed
51

SEE ALSO

53       odbx_capabilities(),        odbx_field_value(),        odbx_lo_close(),
54       odbx_lo_read(), odbx_lo_write(), odbx_result()
55
56
57
58                                 24 July 2018                  odbx_lo_open(3)
Impressum