informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

mi_fp_request()

The mi_fp_request() accessor function obtains the iterator status for an iterator function from an associated MI_FPARAM structure.

Syntax

Usage

The database server sets the iterator-status field in an MI_FPARAM structure when the associated user-defined routine is an iterator function. The iterator status is one of three possible MI_SETREQUEST values.

Iterator-Status Constant Meaning Use
SET_INIT This is the first time that the iterator function is called. Initialize the user state for the iterator function.
SET_RETONE This is an actual iteration of the iterator function. Return items of the active set, one per iteration.
SET_END This is the last time that the iterator function is called. Free any resources associated with the user state.

Use the mi_fp_request() function in an iterator function to determine which of the preceding actions to perform for a given iteration.

Return Values

MI_SETREQUEST
constant
is the iterator-status constant of SET_INIT, SET_RETONE, or SET_END to indicate the current iterator status of the iteration function.
MI_ERROR indicates that the function was not successful.

Related Topics

See the descriptions of the mi_fp_setisdone() function.

For more information on how to create and call iterator functions, see Writing an Iterator Function.


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved