Powered by Zoomin Software. For more details please contactZoomin

DataDirect OpenAccess SDK Help

damex_addResValToRow

  • Last Updated: May 12, 2026
  • 2 minute read
    • OpenAccess SDK
    • Version 9.0
    • Documentation

This function is used to build up a row by adding values for the result column. This function requires that the data to be passed in uses the same data type as the column definition or in any format from which data conversion is supported. Character data can be added by supplying the length or marking the data as null terminated. NULL data is added by specifying the XO_NULL_DATA value flag for the 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 damex_addResValToRow(
    DAM_HSTMT hstmt, 
    DAM_HROW  hRow,
    int       iResColNum,
    int       iXoType,
    void   *  pColVal,
    long      lColValLen)

Parameters for damex_addResValToRow

Parameter Type Description
IN
hstmt DAM_HSTMT The statement handle.
hRow DAM_HROW The row handle.
iResColNum int The result column number.
iXoType int The 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 * The 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.
lColValLen long
  • XO_NULL_DATA - indicates a null value.
  • For VARCHAR, CHAR and NUMERIC data types, the attribute value must be either the length of the string, or XO_NTS if the string is null terminated.
  • For WCHAR, WVARCHAR, and LONGVARCHAR data types, the attribute value must be the number of WCHARs (not the number of bytes) or XO_NTS.
  • For all the other data types, the attribute value must be the length of the data.
  • The length value is required, so that the OpenAccess SDK can validate the correct data size and pass it for the iXoType.
    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