ArrayInputChain IBM data server driver configuration keyword
Enables array input feature when the CLI applications connect to Db2® and Db2 for IBM® i servers.
- Equivalent CLI keyword
- ArrayInputChain
- Equivalent IBM data server provider for .NET connection string keyword
- N/A
- IBM data server driver configuration file (db2dsdriver.cfg) syntax
<parameter name="ArrayInputChain" value="-1 | 0 | <positive integer>"/>
- Default setting:
- -1
- Usage notes:
- -1
- The default value. The array input chaining feature is enabled,
where the array size does not need to be specified. The ArrayInputChain keyword
with the setting of -1 requires the use of the SQL_ATTR_CHAINING_BEGIN and SQL_ATTR_CHAINING_END statement
attributes. When the application does not know the required array
size in advance or if the array size is too large for the application
to allocate required memory, you can enable the array input chaining
feature with the following steps:
- Set the ArrayInputChain keyword to -1.
- Prepare and bind the input parameters to the SQL statement.
- Set the SQL_ATTR_CHAINING_BEGIN statement
attribute with the
SQLSetStmtAttr()
function. - Update the bound parameters with input data and call the
SQLExecute()
function. - Repeat Step 4 for as many rows as there are in the input array.
- Set the SQL_ATTR_CHAINING_END statement attribute
with the
SQLSetStmtAttr()
function after the last row in the array is processed.
- 0
- Disables the array input feature.
- <positive integer>
- The array input feature is enabled, where the array size is set to a positive integer value that is specified with the ArrayInputChain keyword.
Restriction: The CLI driver does not support array input chaining for compound SQL (compiled) or compound SQL (inline) statements.