NAME
odbx_row_fetch - Retrieve rows from the result set
SYNOPSIS
FC#include <opendbx/api.h>F[0]
FCint odbx_row_fetchF[0] FC(odbx_result_t* result);F[0]
DESCRIPTION
Retrieves the values of a row from the current result set returned by FCodbx_resultF[0](). Until this function is invoked, no row and field data is available via FCodbx_field_lengthF[0]() or FCodbx_field_valueF[0]() and these functions will return zero respectively NULL.
Moreover, it is necessary to fetch all rows from a result set until zero is returned indicating that no more rows are available. Otherwise - depending on the backend - an error may occur after calling FCodbx_resultF[0]() the next time or the outstanding rows will be returned within the next result.
FCodbx_row_fetchF[0]() requires a valid FCresultF[0] object which was created by FCodbx_resultF[0](). It must not have been feed to FCodbx_result_finishF[0]() before.
RETURN VALUE
FCodbx_row_fetchF[0]() will return FCODBX_ROW_NEXTF[0] ("1") as long as rows are available from the result set. After the last row has been made available, further calls to this function will return FCODBX_ROW_DONEF[0] ("0") indicating that the result set doesn't contain more rows. The named constants are available since OpenDBX 1.3.2 and the numbers in brackets have to be used instead if a previous release is is the basis for the application development.
In case of an error, values less than zero are returned encodeing the reason why the error occurred.
ERRORS
- -FCODBX_ERR_PARAMF[0]
-
The FCresultF[0] parameter is either NULL or the object is invalid. This is usually the case if result has been already feed to FCodbx_result_finishF[0]().
SEE ALSO
FCodbx_column_countF[0](), FCodbx_column_nameF[0](), FCodbx_column_typeF[0](), FCodbx_errorF[0](), FCodbx_error_typeF[0](), FCodbx_field_lengthF[0](), FCodbx_field_valueF[0](), FCodbx_resultF[0]()