home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Neueste VersionenFixList
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
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IT08280 Status: Geschlossen

CLI APPLICATION USING CHAINING WITH INSERT BUFFERING MAY GET SQL_SUCCESS
BUT SQLROWCOUNT() GIVES 0.

Produkt:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problembeschreibung:
An application that is using CLI insert buffering with chaining 
to insert the rows more than once on the same statement handle 
will receive the SQL_SUCCESS when settiing SQL_ATTR_CHAINING_END 
to end the chain. But SQLRowCount() will return 0 saying no rows 
inserted. 
 
 
Steps to reproduce problem : 
========================== 
opt echo on 
opt callerror on 
quickc 1 1  sample 
sqlallocstmt 1 1 
 
 
sqlsetstmtattr 1 SQL_ATTR_INSERT_BUFFERING 
SQL_ATTR_INSERT_BUFFERING_IGD 
 
sqlexecdirect 1 "create table tab1(id char(10) unique not null)" 
-3 
 
 
sqlexecdirect 1 "insert into tab1 (id) values ('001')" -3 
 
sqlprepare 1 "insert into tab1 (id) values (?)" SQL_NTS 
getmem 1 1 SQL_C_CHAR 30 
sqlbindparameter 1 1 SQL_PARAM_INPUT SQL_C_CHAR SQL_VARCHAR 30 0 
1 
 
sqlsetstmtattr 1 SQL_ATTR_CHAINING_BEGIN 1 
updatemem 1 sql_c_char value SQL_NTS "001" 
sqlexecute 1 
updatemem 1 sql_c_char value SQL_NTS "001"   ### duplicate 
sqlexecute 1 
updatemem 1 sql_c_char value SQL_NTS "001"   ### duplicate 
sqlexecute 1 
updatemem 1 sql_c_char value SQL_NTS "001"   ### duplicate 
sqlexecute 1 
updatemem 1 sql_c_char value SQL_NTS "001"   ### duplicate 
sqlexecute 1 
updatemem 1 sql_c_char value SQL_NTS "001"   ### duplicate 
sqlexecute 1 
 
sqlsetstmtattr 1 SQL_ATTR_CHAINING_END 1 
 
sqlrowcount 1 
 
sqlbindparameter 1 1 SQL_PARAM_INPUT SQL_C_CHAR SQL_VARCHAR 30 0 
1 
updatemem 1 sql_c_char value SQL_NTS "003" 
sqlexecute 1 
sqlbindparameter 1 1 SQL_PARAM_INPUT SQL_C_CHAR SQL_VARCHAR 30 0 
1 
 
 
 
sqlsetstmtattr 1 SQL_ATTR_CHAINING_BEGIN 1 
updatemem 1 sql_c_char value SQL_NTS "002" 
sqlexecute 1 
updatemem 1 sql_c_char value SQL_NTS "004" 
sqlexecute 1 
updatemem 1 sql_c_char value SQL_NTS "005" 
sqlexecute 1 
updatemem 1 sql_c_char value SQL_NTS "006" 
sqlexecute 1 
updatemem 1 sql_c_char value SQL_NTS "007" 
sqlexecute 1 
updatemem 1 sql_c_char value SQL_NTS "008" 
sqlexecute 1 
 
 
sqlsetstmtattr 1 SQL_ATTR_CHAINING_END 1 
 
sqlrowcount 1 
 
 
sqltransact 1 1 sql_rollback 
sqlfreestmt 1 sql_drop 
killenv 1 
 
 
In the above case, first SQL_ATTR_CHAINING_END will fail because 
all the rows are duplicate and returns the SQLRowCount as 
0.(Value returned here depends on the number of rows 
successfully inserted) 
But during the 2nd chaining all the rows are good rows, so 
SQL_ATTR_CHAINING_END should receives SQL_SUCCESS with correct 
row count. Instead SQLRowCount() API is returning 0 or incorrect 
result.
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* DB2 CLI users                                                * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 V10.1 Fix Pack 5 or higher.                   * 
****************************************************************
Local-Fix:
NA
Lösung
Fixed in DB2 V10.1 Fix Pack 5
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
13.04.2015
14.07.2015
14.07.2015
Problem behoben ab folgender Versionen (IBM BugInfos)
Problem behoben lt. FixList in der Version
10.1.0.5 FixList