DB2 Version 9.7 for Linux, UNIX, and Windows

Patch1 CLI/ODBC configuration keyword

Specifies a work-around for known CLI/ODBC application problems.

db2cli.ini keyword syntax:
Patch1 = { 0 | 1 | 2 | 4 | 8 | 16 | ... }
Default setting:
Use no work-arounds.
Usage notes:
This keyword is used to specify a work-around for known problems with ODBC applications. The value specified can be for none, one, or multiple work-arounds. The patch values specified here are used in conjunction with any Patch2 values that might also be set.
Using the CLI/ODBC Settings notebook you can select one or more patches to use. If you set the values in the db2cli.ini file itself and want to use multiple patch values then simply add the values together to form the keyword value. For example, if you want the patches 1, 4, and 8, then specify Patch1=13.
  • 0 = No work around (default)
Table 1. Patch1 CLI/ODBC configuration keyword values
Value Description
1 Replaces COUNT(exp) with COUNT(*) before sending the SQL statement to the database server.

DB2® for z/OS® Version 7 and Version 8.1 in "compatibility mode" do not support the syntax COUNT(exp). With PATCH1 = 1 specified, applications that use this syntax can run without modification. Depending on the complexity of the query that is being replaced, this replacement might not produce the expected results.

This setting is ignored for DB2 for Linux, UNIX, and Windows, and for versions of DB2 for z/OS later than Version 8.1.

4 Changes input timestamp data to date data if the time and fraction part of the timestamp are zero. For example, {ts 'YYYY-MM-DD 00:00:00'} is changed to {d 'YYYY-MM-DD'}. This value is typically needed for older versions of Microsoft Access.
8 Changes input timestamp data to time data if the date part of the timestamp is either 1899-12-30 or 1900-01-01. For example, {ts '1899-12-30 HH:MM:SS'} is changed to {t 'HH:MM:SS'}. This value is typically needed for older versions of Microsoft Access.
64 Null-terminates output GRAPHIC strings. This value is typically needed by Microsoft Access in a double-byte (DBCS) environment.
128 Disables the default performance optimization behavior for the MSysConf table associated with some Microsoft applications.

Microsoft applications, such as Microsoft Access, use a configuration table called MSysConf. Once these applications successfully connect to a database, they will typically issue the following query: "SELECT Config, nValue FROM MSysConf". Because the MSysConf table does not exist in a DB2 database by default, this query fails with the error "SQL0204N "MSysConf" is an undefined name.". Microsoft applications can handle this error and continue processing, however, issuing the query across the network to the DB2 server incurs overhead.

To enhance performance, CLI assumes that this query will always fail, so when it detects that an application is trying to execute this query, it automatically returns an error with an SQLSTATE of S0002 (Table not found). The query, therefore, is never sent to the server. If, however, the user has created the MSysConf configuration table in the database and wants the application to access it, this PATCH1 value can be set to disable the performance optimization and allow the query to be executed.

256 Service use only
512 Service use only
1024 Returns SQL_SUCCESS_WITH_INFO instead of SQL_NO_DATA_FOUND from the SQLExecute() and SQLExecDirect() functions if the executed UPDATE or DELETE statement affected no rows. This value might be needed by some Microsoft Visual Basic applications.
4096 Prevents a COMMIT from being issued after closing a cursor in autocommit mode.
8192 Returns an extra result set after invoking a stored procedure. This extra result set has one row and consists of the output values of the stored procedure. This PATCH1 value might be needed by some Powerbuilder applications that require an extra result set.
32768 Forces the driver to make Microsoft Query applications work with DB2 for z/OS synonyms.
65536 Deprecated
131072 Deprecated
262144 Deprecated
524288 Deprecated
1048576 Service use only
2097152 Service use only