Retrieve column values

When you execute a query (SELECT or EXECUTE FUNCTION statement) in a C UDR, you choose a control mode for the retrieved data.

If the query data is in binary representation, the column value that mi_value() or mi_value_by_name() passes back is in an MI_DATUM structure. Therefore, the size of the data type associated with the column determines the passing mechanism for the column value, as follows:
  • For data types that are passed by value, the MI_DATUM structure contains the actual column value.
  • For data types that are passed by reference, the MI_DATUM structure contains a pointer to this column value.

Within your C UDR, you must use the column data type to determine how to obtain the column value in the MI_DATUM structure. For more information, see Obtain column values.