dam_createVal
- Last Updated: May 12, 2026
- 2 minute read
- OpenAccess SDK
- Version 8.1
- Documentation
This function is used to build the output value of a scalar function. Character data can be added by specifying the length or marking the data as null terminated. NULL data is added by specifying the XO_NULL_DATA value flag for the column value length. The data must be provided in the format in which the output of the scalar function is defined or in any format for which a conversion is supported. This function copies data from the user-supplied buffer to its internal buffers, so the IP can free the memory associated with the input buffer (pColVal).
DAM_HVAL dam_createVal(
XM_Tree * pMemTree,
int iXoType,
void * pColVal,
int iColValLen)
Parameters for dam_createVal
| Parameter | Type | Description |
| IN | ||
| pMemTree | XM_Tree * | The memory tree to use for allocating space. |
| iXoType | int | Type of the data. The data can be supplied in a format that corresponds to the column's definition in the schema or in any other format and the OpenAccess SDK SQL engine will perform the required conversion. |
| pColVal | void * | A pointer to the data. The C type of the data should correspond to the iXoType value. See Table SQL Engine Data Types and the Corresponding C Types. |
| iColValLen | int | Length of the data: XO_NULL_DATA - indicates a null value. For VARCHAR, CHAR and NUMERIC either the length of the string or XO_NTS if the string is null terminated. For all other data types, the length of the data. Note: The length value is required so that OpenAccess can validate that the correct size of data is passed in for the iXoType. |
| RETURN | ||
| DAM_HVAL | non-null - valid handle to the return value null - error adding the value |