AppendRowColToErrorMessage CLI/ODBC and IBM data server driver configuration keyword
Specifies whether the row and column numbers that generated the error are appended the error message string.
- db2cli.ini keyword syntax:
- AppendRowColToErrorMessage= 0 | 1
- IBM® data server driver configuration file (db2dsdriver.cfg) syntax:
- <parameter name="AppendRowColToErrorMessage" value="0 | 1"/>
Attention: The IBM data server
driver configuration
file (db2dsdriver.cfg) syntax is available in Db2 11.5.4 and later.
- Default setting:
- The default setting of 0 will return the error message string without the row and column numbers.
- Usage notes:
- Specify 1 to append the row and column number that generated the error to the error message
string. The values for row and column numbers are only appended when Db2®
CLI is able to
apply a row or column number to the problem.
The row or column numbers appended to error messages are the same positive values that would be returned if an application called
SQLGetDiagField()with the DiagIdentifier argument as SQL_DIAG_ROW_NUMBER or SQL_DIAG_COLUMN_NUMBER. When AppendRowColToErrorMessage is set to 1, errors returned from calls toSQLGetDescField(),SQLGetDescRec()orSQLError()will have these row or column numbers appended with the following format: Row=<r>, Col=<c>, if they can be determined.For example, the default text for error CLI0111E is as follows:[IBM][CLI Driver] CLI0111E Numeric value out of range. SQLSTATE=22003Specifying 1 to append the row and column number will return the following text for error CLI0111E:[IBM][CLI Driver] CLI0111E Numeric value out of range. SQLSTATE=22003 {Row=2,Col=1}Note: It is also possible for an error to be returned with only a row number.