home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC70645 Status: Closed

CLI0124E OCCURS WHEN THE SELECT STATEMENT HAS ONE PARAMETER MARKER BUT
DECLARES TWO PARAMETERS IN THE PROGRAM.

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
After upgrading from V97 FP1 to V97 FP2, CLI0124E occurs when 
the select statement has only one parameter marker but declaring 
two parameters in a program 
then binding a value to only one parameter. 
 
Since no value is supplied to the second argument, ODBC is 
assuming default parameter and passing the SQL_DEFAULT_PARAM 
indicator. 
Before to FP2 there was not Default param/Unassigned parameter 
check, CLI is just ignoring the second SQLBindParameter since 
there is only one "?". 
In FP2, there was an enhancement of Extended Indicator function. 
Because of the indicator check if the extended indicator is not 
enabled, SQLBindParameter is throwing error. 
Since the application is running with a default extended 
indicator setting, its behavior should not be changed to keep 
the backward compatibility. 
The same error happens at INSERT or UPDATE case as well. 
 
 
The following code will result in CLI0124E. 
 
      With cSelect.Parameters 
          .Add("@ABC", OdbcType.Char, 17) 
          .Add("@EFG", OdbcType.Char, 8) 
      End With 
      cSelect.Prepare() 
 
      cSelect.Parameters(0).Value = "12345678"  'Set 1st param 
 
 
      Dim tmpDataAdapter As New OdbcDataAdapter(cSelect) 
 
      tmpDataAdapter.Fill(dt) 
 
 
 
Another symptom of this problem is that an ODBC application 
using the DB2 CLI driver can hang indefinitely, or crash.  The 
problem will occur when performing an SQLBindParameter() call 
such that the address used for both the data buffer (rgbValue) 
and the length or indicator value (pcbValue) are logical offsets 
as opposed to real addresses, and the statement attribute 
SQL_ATTR_BIND_OFFSET_PTR was set prior to the call to 
SQLBindParameter. 
 
This should work, however without this APAR, an application can 
hang when trying to call the SQLBindParameter API. 
 
A DB2 CLI trace should reveal the following for example at the 
hang point: 
 
SQLBindParameter( hStmt=1:4, iPar=1, fParamType=SQL_PARAM_INPUT, 
fCType=SQL_C_SLONG, fSQLType=SQL_INTEGER, cbColDef=10, 
ibScale=0, rgbValue=&00000009, cbValueMax=0, pcbValue=&00000005 
) 
---> Time elapsed - +5.701000E-003 seconds
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* After upgrading from V97 FP1 to V97 FP2, CLI0124E occurs     * 
* when the select statement has only one parameter marker but  * 
* declaring two parameters in a program then binding a value   * 
* to only one parameter.                                       * 
*                                                              * 
* Since no value is supplied to the second argument, ODBC is   * 
* assuming default parameter and passing the SQL_DEFAULT_PARAM * 
* indicator.                                                   * 
* Before to FP2 there was not Default param/Unassigned         * 
* parameter check, CLI is just ignoring the second             * 
* SQLBindParameter since there is only one "?". In FP2, there  * 
* was an enhancement of Extended Indicator function. Because   * 
* of the indicator check if the extended indicator is not      * 
* enabled, SQLBindParameter is throwing error. Since the       * 
* application is running with a default extended indicator     * 
* setting, its behavior should not be changed to               * 
* keep the backward compatibility.                             * 
*                                                              * 
* The same error happens at INSERT or UPDATE case as well. The * 
* following statements will result in CLI0124E.                * 
*                                                              * 
* With cSelect.Parameters                                      * 
* .Add("@ABC", OdbcType.Char, 17)                              * 
* .Add("@EFG", OdbcType.Char, 8)                               * 
* End With                                                     * 
* cSelect.Prepare()                                            * 
* cSelect.Parameters(0).Value = "12345678"  'Set 1st param     * 
* Dim tmpDataAdapter As New OdbcDataAdapter(cSelect)           * 
* tmpDataAdapter.Fill(dt)                                      * 
*                                                              * 
* Another symptom of this problem is that an ODBC application  * 
* using the DB2 CLI driver can hang indefinitely, or crash.    * 
* The problem will occur when performing an SQLBindParameter() * 
* call such that the address used for both the data buffer     * 
* (rgbValue) and the length or indicator value (pcbValue) are  * 
* logical offsets as opposed to real addresses, and the        * 
* statement attribute SQL_ATTR_BIND_OFFSET_PTR was set prior   * 
* to the call to SQLBindParameter.                             * 
* This should work, however without this APAR, an application  * 
* can hang when trying to call the SQLBindParameter API. A DB2 * 
* CLI trace should reveal the following for example at the     * 
* hang point:                                                  * 
*                                                              * 
* SQLBindParameter( hStmt=1:4, iPar=1,                         * 
* fParamType=SQL_PARAM_INPUT,                                  * 
* fCType=SQL_C_SLONG, fSQLType=SQL_INTEGER, cbColDef=10,       * 
* ibScale=0, rgbValue=&00000009, cbValueMax=0,                 * 
* pcbValue=&00000005)                                          * 
*                                                              * 
* ---> Time elapsed - +5.701000E-003 seconds                   * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 UDB version 9.7 fix pack 4.                   * 
****************************************************************
Local Fix:
available fix packs:
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Solution
Problem was first fixed in DB2 UDB Version 9.7 Fix Pack 4
Workaround
not known / see Local fix
BUG-Tracking
forerunner  : APAR is sysrouted TO one or more of the following: IC73415 
follow-up : 
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
18.08.2010
10.05.2011
10.05.2011
Problem solved at the following versions (IBM BugInfos)
9.7.FP4
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.4 FixList