Powered by Zoomin Software. For more details please contactZoomin

DataDirect OpenAccess SDK Help

dam_getValueToSet

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

This function gets the value portion of a value object. A value object consists of the column handle and the value for that column. It is retrieved from a DAM_HROW by using the functions dam_getFirstValueSet and dam_getNextValueSet.

The iType specifies how you want the value to be returned. In this version, iType must match the type of the column as defined in the schema or must be XO_TYPE_CHAR. Other conversions are not supported at this time.

You can obtain the type of the column by using the dam_describeCol function on the column handle returned by the dam_getColToSet function.

int dam_getValueToSet(
    DAM_HROWELEM  hRowElem, 
    int           iXoType,
    void **       ppVal, 
    int *         piValLen)

Parameters for dam_getValueToSet

Parameter Type Description
IN
hRowElem DAM_HROWELEM The value set handle.
iXoType int The data type in which to get the value. 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.
OUT
ppVal void ** The pointer to the data is returned in this location. The C type of the data corresponds to the iXoType value. See Table SQL Engine Data Types and the Corresponding C Types. Use this pointer only if the *piValLen is not set to XO_NULL_DATA. Do not attempt to free this data.
piValLen int * Length of the data pointed to by *ppVal:
  • XO_NULL_DATA - null data
  • XO_NTS - null terminated string
  • >= 0 - length of the data
  • Note: The function dam_addValToRow uses long to specify the data length. This discrepancy will be fixed in future releases.
    RETURN
    int Status of the function call:
  • DAM_SUCCESS - all data retrieved.
  • DAM_SUCCESS_WITH_RESULT_PENDING - more data is available and should be retrieved by calling this function again. This occurs for a large LONGVARBINARY data.
  • DAM_FAILURE - error in getting the data. Most likely the data cannot be converted to the XO_Type asked for.
  • See also

    TitleResults for “How to create a CRG?”Also Available inAlert