RetryParameterBindingOnError IBM data server driver configuration keyword

Sets the value that indicates whether failed statements, which are result of data type mismatch in its parameters, are rerun after implicitly recasting parameters.

Equivalent CLI keyword
RetryParameterBindingOnError
Equivalent IBM® data server provider for .NET connection string keyword
RetryParameterBindingOnError
IBM data server driver configuration file (db2dsdriver.cfg) syntax
For Db2® for z/OS® Version 10 and later servers.
<parameter name="RetryParameterBindingOnError" value="-420 | 0 | 1 | 420"/>
For all servers other than Db2 for z/OS Version 10 and later servers.
<parameter name="RetryParameterBindingOnError" value="0 | 1 | 420"/>
Default setting:
1
Usage notes:
The CLI driver and IBM Data Server Provider for .NET provide implicit casting of mismatched data type for a parameter to avoid application errors. If an application specified parameter data type does not match the actual data type of a database object, an error can be returned by the database server. By default, the data type mismatch error results in the CLI driver and IBM Data Server Provider for .NET implicitly recasting the parameter after the describe statement is issued. The implicit recast has a negative performance impact as result of extra network flow from issuing the describe statement. You can disable implicit casting of parameters by setting the RetryParameterBindingOnError keyword to 0, which can help you to identify improper data types that are specified in an application.
0
A data type mismatch error from a database server for parameters is returned to the application.
1
A data type mismatch error from a database server for parameters triggers implicit recast of parameter data type and statement is issued again.
420 or -420
The 420 value represents absolute value of the SQL0420N error message.
420
When you specify the 420 value, the SQL0420N error also triggers implicit recast of parameter data type in addition to all recast scenarios that occur under the 1 value.

When your application is connecting to the Db2 for z/OS Version 10 and later servers, 420 is the default value.

-420
The -420 value is valid only when your application is connecting to Db2 for z/OS Version 10 and later servers. When you specify the -420 value, the implicit recast of parameter data type is disabled when the SQL0420N error is encountered. The -420 value is ignored when the target database is not Db2 for z/OS Version 10 and later servers.
In Version 10.5 Fix Pack 2 and later, the CLI driver and IBM Data Server Provider for .NET support the RetryParameterBindingOnError keyword. The CLI driver supports specifying SQL codes in the RetryParameterBindingOnError keyword syntax. When the specified SQL codes are returned by the server, the CLI driver attempts to implicitly recast the parameter.
Important:
  • The following SQL codes trigger implicit recast of parameter data type and reissue of the statement when the RetryParameterBindingOnError keyword is enabled:
    • SQL0171N
    • SQL0180N
    • SQL0181N
    • SQL0301N
    • SQL0302N
    • SQL0303N
    • SQL0304N
    • SQL0305N
    • SQL0404N
    • SQL0433N
    • SQL0461N
    • SQL0804N