Author: kksiva23 | Posted on: 6/18/2010 10:32:47 AM | Views : 285

hi,

 int RoleID=1;
string LoginRightID="15";
 srpLoginRole RoleEntity = MobjDataAccess.SelectRecordByID(RoleID);
  RoleEntity.lgrCmpLoginRights = RoleEntity.lgrCmpLoginRights + "," + LoginRightID.ToString();
  oDC.srpLoginRoles.Attach(LocalTable);
  oDC.Refresh(RefreshMode.KeepCurrentValues, LocalTable);
  oDC.SubmitChanges(ConflictMode.ContinueOnConflict);
here i select a row and modify one column after that i update that record.
this code throwed error like

{System.NotSupportedException: An attempt has been made to Attach or Add an entity that is not new, perhaps having been loaded from another DataContext.  This is not supported.

how can i solve it?
...

Go to the complete details ...