DB2NETNamedParam CLI/ODBC configuration keyword
Specifies if named parameters are used by Db2® .NET applications.
- db2cli.ini keyword syntax:
- DB2NETNamedParam = 0 | 1
- Default setting:
- The IBM® Data Server Provider for .NET recognizes named parameters as parameters, but ignores positioned parameters, in SQL statements.
- Usage notes:
- By default, theIBM Data Server Provider for
.NET processes tokens in an SQL statement with the format "@<paramname>"
as named parameters and ignores any positioned parameters, where positioned
parameters are specified with a '?' character or a colon followed
by a name (:name). The following query is an example of a query that contains a named parameter:
This is an example of a query that contains a positioned parameter:SELECT * FROM T1 WHERE C1 = @param1
SELECT * FROM T1 WHERE C1 = ?
Specify 0 to indicate that only positioned parameters will be recognized as parameters in SQL statements. This setting can improve application performance by reducing the resource required to process named parameters.