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 | |
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 |