Begin detailed description.

This figure is a flowchart that depicts the functions that you call to execute a MERGE statement with multiple values for some parameter markers and single values for other parameter markers. Two different methods that pass multiple values are depicted in the flowchart. One of these methods uses a separate prepare and execute step, and one method combines the prepare and execute steps. In this description, these methods are presented in two separate tables.

The following table describes the process for performing a MERGE with separate prepare and execute steps. Each row in this table represents a function call in this process. Each of these functions are required. The functions are presented in the order in which you call them in your application.
Function call Description
SQLAllocHandle() Allocates a statement handle.
SQLPrepare() Prepares the SQL query.
SQLBindParameter() Binds parameter markers in the SQL statement to arrays. You call this function once for each parameter marker in the SQL statement.
SQLParamOptions() Specifies the number of elements each array contains
SQLExecute() Executes the SQL statement. You call this function only once to execute the SQL statement with all values.
SQLFreeHandle() Frees the statement handle.
The following table describes the process for performing a MERGE with a single prepare and execute step. Each row in this table represents a function call in this process. Each of these functions are required. The functions are presented in the order in which you call them in your application.
Function call Description
SQLAllocHandle() Allocates a statement handle.
SQLBindParameter() Binds parameter markers in the SQL statement to arrays. You call this function once for each parameter marker in the SQL statement.
SQLSetStmtAttr() Specifies the number of elements each array contains with the SQL_ATTR_PARAMSET_SIZE attribute.
SQLExecDirect() Prepares and executes the SQL statement. You call this function only once to execute the SQL statement with all values.
SQLFreeHandle() Frees the statement handle.

End detailed description.