---
name: "odbx_field_value"
section: "3"
platform: "linux"
package: "opendbx"
version: "1.4.6-13"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/odbx_field_value"
---

# odbx\_field\_value(3)

Returns the data stored in a field

## NAME

odbx\_field\_value - Returns the data stored in a field

## SYNOPSIS

```
FC#include <opendbx/api.h>F[0]
```

FCconst char\* **odbx\_field\_value**F\[0\]  FC(odbx\_result\_t\* *result*, unsigned long *pos*);F\[0\]

## DESCRIPTION

FC**odbx\_field\_value**F\[0\]() returns a pointer to the field data specified by the column index FCposF\[0\]. The field is part of the current row which was retrieved by the latest call to FC**odbx\_row\_fetch**F\[0\]().

All values except binary objects are handed back as strings terminated by the zero character. This does also apply to numeric values, dates, etc. They have to be converted to their binary machine dependent representation before arithmetic operations can be done. If a value is undefined, i.e. "NULL" is attached to the field in the database, an equivalent NULL pointer is returned.

The FCresultF\[0\] parameter required by this function must be a valid result set returned by FC**odbx\_result**F\[0\]() and must not has been feed to FC**odbx\_result\_finish**F\[0\]() before.

Valid column indices for the requested column provided via FCposF\[0\] start with zero and end with the value returned by FC**odbx\_column\_count**F\[0\]() minus one.

## RETURN VALUE

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

## ERRORS

This function will also return zero if the FCresultF\[0\] parameter is invalid or if the value of FCposF\[0\] is out of range.

## SEE ALSO

FC**odbx\_column\_type**F\[0\](), FC**odbx\_field\_length**F\[0\](), FC**odbx\_result**F\[0\]()
