sdaiPutAggrByIterator


Writes the specified value to the current element of the actual iterator.
The data type, i.e., primitive type of the value, and the data value to be written in the actual aggregate element, are specified as arguments to this function.
This operation is applicable for the aggregate types ARRAY and LIST owned by application instances.
The model that holds the actual aggregate must be open for write access before this function can be successfully performed.
Related functions: sdaiAppend , sdaiPrepend , sdaiInsertAfter , sdaiInsertBefore, sdaiPutAggrByIndex
Header:
#include "sdai.h"
Prototype:
void sdaiPutAggrByIterator(SdaiIterator      iterator,
                            SdaiPrimitiveType valueType, 
                            ...); 
Arguments:

iterator

A numeric iteratorID that uniquely identifies an aggregate element in the EDMdatabase that will receive the specified value.
The iteratorID is defined by the sdaiCreateIterator function.

valueType

The data type, i.e. the primitive type of the data value to write in the specified aggregate element. This <valueType> must be the same or a compatible type of the primitive type of the value in the actual aggregate elements as defined in the related EXPRESS schema. The primitive type sdaiSELECT can be used to write all data types. The primitive type sdaiADB can be used to write all data types except typed values.
The primitive type sdaiINTEGER is compatible with sdaiREAL, and sdaiBOOLEAN is compatible with sdaiLOGICAL, hence conversion between these compatible data types will be performed when required.

value

The actual value to write in the specified aggregate element. The type of <value> must be the same as specified by the <valueType> argument.

Returns:
Void – use sdaiErrorQuery to check for error in operation.
Example:
SdaiIterator iterator;
SdaiErrorCode errCode;
SdaiAggr aggrId;
...
iterator = sdaiCreateIterator(aggrId);
. . .
sdaiPutAggrByIterator(iterator, sdaiREAL, 10.50);
if (errCode = sdaiErrorQuery()) {
/* Error in operation */ 
printf("\nError: %s in sdaiPutAggrByIterator \n", 
edmiGetErrorText(errCode)); 
goto error; 
}
. . .