IBM Support

IC81257: DB2DATAADAPTER.UPDATE(DATASET) THROWS DB2EXCEPTION TRYING TO UPDATE ROW TO SAME VALUES

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • After installing the the DB2 v. 9.7 FP5 the DB2DataAdapter will
    throw DB2Exception when updating a DataTable which contains an
    updated row with assigned new values the same as the original
    values (DataRowVersion.Original).
    
    Example .NET:
    
    Assume:  table T_TEST has column TESTVAL and only 1 row with
    value "test1"
    
                DB2DataAdapter adapter = new DB2DataAdapter();
                adapter.SelectCommand = new DB2Command("select *
    from t_test",db2Conn);
                DataSet ds = new DataSet();
                adapter.Fill(ds);
    
                DB2CommandBuilder db2cb = new
    DB2CommandBuilder(adapter);
                DataRow row = ds.Tables[0].Rows[0];
                row["TESTVAL"] = "test1";
    
                adapter.Update(ds);
    
    The eecution of adapter.Update(ds) will result in DB2Exception
    with message:
    
    ERROR [22540] [IBM][DB2/NT] SQL20434N  An update operation
    hasset all of its target columns to unassigned
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * .NET apps using 9.7.5 DB2 .NET provider and DB2DataAdapter   *
    * API.                                                         *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to product V9.7 FP6.                                 *
    ****************************************************************
    

Problem conclusion

  • Problem was first fixed in DB2 UDB Version 9.7 Fix Pack 6.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC81257

  • Reported component name

    DB2 CONNECT

  • Reported component ID

    DB2CONNCT

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-02-07

  • Closed date

    2012-06-06

  • Last modified date

    2012-06-06

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IC84342

Fix information

  • Fixed component name

    DB2 CONNECT

  • Fixed component ID

    DB2CONNCT

Applicable component levels

  • R970 PSN

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC81257

Modified date: 06 June 2012