DB2 Version 9.7 for Linux, UNIX, and Windows

Patch2 CLI/ODBC configuration keyword

Specifies a workaround for known CLI and ODBC application problems.

db2cli.ini keyword syntax:
Patch2 = "patch value 1, patch value 2, patch value 3, ..."
Default setting:
Use no workarounds
Usage notes:
You can specify this value for zero, one, or multiple workarounds. You can use the patch values that are specified here with any Patch1 values that might also be set.
When specifying multiple patches, the values are specified in a comma-delimited string (unlike the Patch1 option where the values are added together and the sum is used).
  • 0 = No work around (default)
To set Patch2 values 3, 4 and 8 you would specify:
Patch2="3, 4, 8"
Table 1. Patch2 CLI/ODBC configuration keyword values
Value Description
1 Deprecated
3 Service use only.
4 Deprecated
5 Deprecated
6 Forces CLI to return a message indicating that scrollable cursors are not supported. This setting is required by some applications (such as Visual Basic) that make use of LOBs or that do not require or want scrollable cursors to be used, even though they have been explicitly requested by the application.
7 Maps all GRAPHIC column data types to the CHAR column data type. The precision of a GRAPHIC column will also be doubled; for example, GRAPHIC(20) will be reported as CHAR(40).
8 Ignores catalog search arguments in schema calls.
11 SQLGetInfo() function reports that catalog names are supported for Visual Basic stored procedures.
12 Deprecated
13 Prevents keywords in the db2cli.ini initialization file from being appended to the output connection string.
14 Deprecated
15 Causes a period separator to be used instead of the default locale's decimal separator in character output.
16 Deprecated
17 Deprecated
18 Attempts to replace literals with parameter markers for inefficient applications that use literals repeatedly. It is only applicable to INSERT SQL statements with the VALUES clause using only literals. Coding your application properly to use parameter markers is the best solution.

This value is no longer available in Version 9.7 or later.

19 Removes parentheses from the ON clause of an outer join, where the outer join is an ODBC escape sequence and the server is DB2® for MVS/ESA Version 5. DB2 for MVS/ESA Version 5 does not currently support the ODBC syntax where parentheses are permitted in the ON clause of an outer join clause. Setting this Patch2 value allows the outer join escape sequence to be used against DB2 for MVS/ESA Version 5. You should only set this value when the server is DB2 for MVS/ESA Version 5.
20 Forces CLI to rewrite the BETWEEN predicate when the server is DB2 for MVS/ESA. DB2 for MVS/ESA does not currently support the BETWEEN predicate with parameter markers as both operands. Setting this Patch2 value causes (expression ? BETWEEN ?) to be rewritten as (expression >= ? and expression <= ?).
21 Deprecated
22 Causes theSQLGetInfo() function to report SQL_OUTER_JOINS=NO and SQL_OJ_CAPABILITIES=0. This prevents the application from using outer joins where they are not supported, thus ensuring that the outer join queries do not fail.
23 Deprecated
24 Reports TIME data as SQL_CHAR data. This patch value is used as a workaround for Microsoft Access applications.
25 Removes trailing zeros in the CHAR representation of DECIMAL columns; used as a workaround for Microsoft Access applications.
28 Deprecated
29 Removes leading zeros in the string representation of DECIMAL values x, where 1 > x > -1; used as a workaround for ADO applications with some MDAC versions.
30 Disables stored procedure caching optimization.
31 Deprecated
32 Deprecated
33 Returns the ISO version of timestamp data when converted to CHAR, rather than the ODBC version.
34 Deprecated
38 Turns statement caching off.
42 Prevents the FOR UPDATE clause from being used with keyset cursors. By default, most applications behaves as though keyset cursors is updatable. However, if updatable cursor is not required, then this Patch2 value makes the cursor read-only (but still scrollable and sensitive to changes made by others).
50 Frees LOB locators when the SQLFetch() function is executed, rather than when a COMMIT is issued. This Patch2 value frees the locators that are used internally when applications fetch LOB data without binding the LOB columns with the SQLBindCol() function(or equivalent descriptor APIs). Locators that are explicitly returned to the application must still be freed by the application. You can use this Patch2 value to avoid scenarios where an application receives SQLCODE = -429 (no more locators).
56 Allows client support for Early Close Cursors for those servers that do not support it as in the case of DB2 Universal Database™ for z/OS® and OS/390® version 7 or earlier.
57 Allows calling a stored procedure that returns a NULL output parameter value without providing an output indicator pointer. This is normally applicable to older versions of Borland Delphi products.
58 DateTime values inserted into the database that cause truncation errors can be downgraded to a truncation warning using this Patch2 value.
61 When data is given to the client from an SQL_CHAR data type,there might be right padded spaces. This patch value strips off right padded single byte spaces, but not double byte spaces. This behavior partially mimics the Neon Shadow Driver behavior
66 Allows applications to retrieve the regional setting that affects decimal separators in a Windows environment. The regional setting is normally ignored by default. This patch value is ignored if Patch2=15 or db2set registry variables DB2TERRITORY or DB2CODEPAGE are set. The only supported decimal separators are the period and comma.
78 Alters the behavior of the SQLGetPosition() function when the source LOB value is in a DBCLOB column on DB2 Universal Database for z/OS and OS/390 Version 7.1 or later. Setting this PATCH2 value causes the SQLGetPosition() function to query SYSIBM.SYSDUMMYU instead of SYSIBM.SYSDUMMY1.
81 According to the CLI specification, IBM® Data Server Driver for ODBC and CLI should return the column ordinal number for an expression. By default, CLI returns the column ordinal number. According to the ODBC Specification, an ODBC driver should return an empty string as the column names for an expression. If the Patch2 CLI/ODBC configuration keyword is set to 81, an empty string is returned for the column name of an expression by the IBM Data Server Driver for ODBC and CLI.
82 Forces the CLI to use the meaning of the SQL_ATTR_REPLACE_QUOTED_LITERALS value instead of the SQL_ATTR_RESET_CONNECTION value . SQL_ATTR_RESET_CONNECTION is supported starting with DB2 Version 9.7 Fix Pack 5 and later Fix Packs