odbx_field_length(3)

NAME
odbx_field_length - Returns the length of a field value

SYNOPSIS
\FC#include <opendbx/api.h>\F[]

\FCunsigned long odbx_field_length\F[]
\FC(odbx_result_t* result, unsigned long pos);\F[]

DESCRIPTION
\FCodbx_field_length\F[]() returns the length of the field value in bytes. The field is part of the current row which was retrieved by the latest call to \FCodbx_row_fetch\F[]() and is specified by the column index given by \FCpos\F[].

The \FCresult\F[] parameter required by this function must be a valid result set returned by \FCodbx_result\F[]() and must not has been feed to \FCodbx_result_finish\F[]() before.

Valid column indices for the requested column provided via \FCpos\F[] start with zero and end with the value returned by \FCodbx_column_count\F[]() minus one.

RETURN VALUE
The \FCodbx_field_length\F[]() function provides the number of bytes of the specified field to the caller. If the field value consists of character data, the returned length will be without the terminating zero character. For binary values the exact size of the block as stored in the database is returned.

ERRORS
This function will also return zero if the \FCresult\F[] parameter is invalid or if the value of \FCpos\F[] is out of range.

SEE ALSO
\FCodbx_field_value\F[](), \FCodbx_result\F[]()