Powered by Zoomin Software. For more details please contactZoomin

DataDirect OpenAccess SDK Help

dam_addValToArray

  • Last Updated: May 12, 2026
  • 1 minute read
    • OpenAccess SDK
    • Version 8.1
    • Documentation

This function is used to build up an Array by adding values for elements one at a time. 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. This function copies data from the user supplied buffer to its internal buffers and therefore the IP can free the memory associated with the input buffer (pColVal).

int dam_addValToArray(
    DAM_HSTMT   hstmt, 
    DAM_HARRAY  hArray,
    DAM_HCOL    hCol, 
    int         iElementNum,
    int         iXoType,
    void       *pColVal,
    long        lColValLen)

Parameters for dam_addValToArray

Parameter Type Description
IN
hstmt DAM_HSTMT Statement handle
hArray DAM_HARRAY Array handle
hCol DAM_HCOL Column handle
iElementNum int Index of the element to be added
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 * 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 long The 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.
RETURN
int DAM_SUCCESS - added the value to the row.
DAM_FAILURE - error adding the value.
TitleResults for “How to create a CRG?”Also Available inAlert