1odbx_field_length(3)                OpenDBX               odbx_field_length(3)
2
3
4

NAME

6       odbx_field_length - Returns the length of a field value
7

SYNOPSIS

9       #include <opendbx/api.h>
10
11
12       unsigned long odbx_field_length (odbx_result_t* result, unsigned long
13                                       pos);
14

DESCRIPTION

16       odbx_field_length() returns the length of the field value in bytes. The
17       field is part of the current row which was retrieved by the latest call
18       to odbx_row_fetch() and is specified by the column index given by pos.
19
20       The result parameter required by this function must be a  valid  result
21       set  returned  by  odbx_result() and must not has been feed to odbx_re‐
22       sult_finish() before.
23
24       Valid column indices for the requested column provided  via  pos  start
25       with  zero and end with the value returned by odbx_column_count() minus
26       one.
27

RETURN VALUE

29       The odbx_field_length() function provides the number of  bytes  of  the
30       specified field to the caller. If the field value consists of character
31       data, the returned length will be without the terminating zero  charac‐
32       ter.  For  binary  values  the exact size of the block as stored in the
33       database is returned.
34

ERRORS

36       This function will also return zero if the result parameter is  invalid
37       or if the value of pos is out of range.
38

SEE ALSO

40       odbx_field_value(), odbx_result()
41
42
43
44                                22 August 2021            odbx_field_length(3)
Impressum