Specifies if named parameters are used by DB2® .NET applications.
- db2cli.ini keyword syntax:
- DB2NETNamedParam = 0 | 1
- Default setting:
- The DB2 .NET Data Provider
recognizes named parameters as parameters, but ignores positioned
parameters, in SQL statements.
- Usage notes:
- By default, the DB2 .NET
Data Provider 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
is an example of a query that contains a named parameter:
SELECT * FROM T1 WHERE C1 = @param1
This
is an example of a query that contains a positioned parameter:
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 overhead required to process named parameters.