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 IC82783 Status: Closed

.NET APPLICATION : PARAMETERS ARE PROCESSED IN INCORRECT ORDER

product:
DB2 CONNECT / DB2CONNCT / 970 - DB2
Problem description:
If you have a .NET application that is using ParameterName in 
your query to update (or insert) a clob > 32K and another 
column, 
you might encounter a data corruption because the command 
paramaters 
are processed in incorrect order. 
 
The following example will insert "CLOBTEST" in cclob column and 
"Some long CLOB value padded...." in the column col2 when we 
expect the opposite. 
 
string clobValue = "Some long CLOB value padded with '-' to 
33,000 characters".PadRight(33000, '-'); 
using (var conn = new DB2Connection(bld.ConnectionString)) 
{ 
var update = new DB2Command(string.Format("UPDATE tab1 SET 
cclob=@CCLOB, col2=@COL2 WHERE col1 ='{0}' ",col1Value), conn); 
 
var col2 = update.Parameters.Add("@COL2", DB2Type.Char); 
var cclob = update.Parameters.Add("@CCLOB", DB2Type.Clob); 
 
cclob.Value = clobValue; 
col2.Value = "CLOBTEST"; 
conn.Open(); 
update.ExecuteNonQuery(); 
}
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* DB2 .NET                                                     * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 9.7 FP6 or above.                             * 
****************************************************************
Local Fix:
N/A
available fix packs:
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
The problem was first fixed in DB2 9.7 FP6
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
20.04.2012
20.12.2012
20.12.2012
Problem solved at the following versions (IBM BugInfos)
9.7.FP6
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.6 FixList