1odbx_field_value(3)                 OpenDBX                odbx_field_value(3)
2
3
4

NAME

6       odbx_field_value - Returns the data stored in a field
7

SYNOPSIS

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

DESCRIPTION

16       odbx_field_value() returns a pointer to the field data specified by the
17       column  index  pos.  The field is part of the current row which was re‐
18       trieved by the latest call to odbx_row_fetch().
19
20       All values except binary objects are handed back as strings  terminated
21       by  the  zero character. This does also apply to numeric values, dates,
22       etc. They have to be converted to their binary machine dependent repre‐
23       sentation before arithmetic operations can be done. If a value is unde‐
24       fined, i.e. "NULL" is attached to the field in the database, an equiva‐
25       lent NULL pointer is returned.
26
27       The  result  parameter required by this function must be a valid result
28       set returned by odbx_result() and must not has been  feed  to  odbx_re‐
29       sult_finish() before.
30
31       Valid  column  indices  for the requested column provided via pos start
32       with zero and end with the value returned by odbx_column_count()  minus
33       one.
34

RETURN VALUE

36       The  function  provides  the  address  pointing to the beginning of the
37       field value where the string or binary object is stored  in  memory  to
38       the caller. It returns a NULL pointer if the field is a "NULL" value.
39

ERRORS

41       This  function will also return zero if the result parameter is invalid
42       or if the value of pos is out of range.
43

SEE ALSO

45       odbx_column_type(), odbx_field_length(), odbx_result()
46
47
48
49                                 20 July 2023              odbx_field_value(3)
Impressum