row[keyField] != keyValueThis code was intended to check if the values were different, but since both the row column and the keyValue parameter are of type object, the equality test is checking if they are referencing the same object rather than testing if they have the same value. The check should have been:
!keyValue.Equals(row[keyField])For now, you can get around this problem by overriding your ABusinessObject's PopulateKeyField() method as shown here:
protected override void PopulateKeyField(string keyField, object keyValue, string tableName) { System.Data.DataTable dt = this.GetCurrentDataSet().Tables[tableName]; foreach (System.Data.DataRow row in dt.Rows) { if (row[keyField] == System.DBNull.Value || !keyValue.Equals(row[keyField])) { row[keyField] = keyValue; } } }I'll add this to our "Known Issues" page and give you credit for finding this in the next version of the What's New Guide.