DB2 10.5 for Linux, UNIX, and Windows

Binding parameter markers in CLI applications

This topic describes how to bind parameter markers to application variables before executing SQL statements. Parameter markers in SQL statements can be bound to single values or to arrays of values. Binding each parameter marker individually requires a network flow to the server for each set of values. Using arrays, however, allows several sets of parameter values to be bound and sent at once to the server.

Before you begin

Before you bind parameter markers, ensure you have initialized your application.

Procedure

To bind parameter markers, perform either of the following steps: