Set input parameters

When you send a prepared statement for execution, you pass any input-parameter values in MI_DATUM structures. Therefore, the data type of the column associated with an input parameter determines the passing mechanism for the input-parameter value, as follows:
  • For data types that are passed by value, the MI_DATUM structure must contain the actual input-parameter value.
  • For data types that are passed by reference, the MI_DATUM structure must contain a pointer to the input-parameter value.

Within your C UDR, you must use the column data type to determine how to assign the input-parameter value in the MI_DATUM structure. To assign the input-parameter values, you send an array of MI_DATUM structures to the mi_exec_prepared_statement() or mi_open_prepared_statement() function, which sends the prepared statement to the database server for execution. For more information, see Assign values to input parameters.