odbx_row_fetch3
Retrieve rows from the result set
Usage
FC#include <opendbx/api.h>F[0]
FCint odbx_row_fetchF[0] FC(odbx_result_t* result);F[0]
Overview
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 FC
odbx_result_finishF[0]().
Releases
7 releases since Debian 8 (Jessie); the text changed 6 times.