none
Exception on Updating Table from LINQ2SQL DataModel RRS feed

  • Question

  • Hi im getting the following stack : 

    en System.Data.Linq.IdentityManager.StandardIdentityManager.MultiKeyManager`3.TryCreateKeyFromValues(Object[] values, MultiKey`2& k)
       en
    System.Data.Linq.IdentityManager.StandardIdentityManager.MultiKeyManager`3.TryCreateKeyFromValues(Object[] values, MultiKey`2& k)
       en
    System.Data.Linq.IdentityManager.StandardIdentityManager.MultiKeyManager`3.TryCreateKeyFromValues(Object[] values, MultiKey`2& k)
       en
    System.Data.Linq.IdentityManager.StandardIdentityManager.MultiKeyManager`3.TryCreateKeyFromValues(Object[] values, MultiKey`2& k)
       en
    System.Data.Linq.IdentityManager.StandardIdentityManager.IdentityCache`2.Find(Object[] keyValues)
       en System.Data.Linq.IdentityManager.StandardIdentityManager.Find(MetaType type, Object[] keyValues)
       en System.Data.Linq.CommonDataServices.GetCachedObject(MetaType type, Object[] keyValues)
       en System.Data.Linq.ChangeProcessor.GetOtherItem(MetaAssociation assoc, Object instance)
       en System.Data.Linq.ChangeProcessor.BuildEdgeMaps()
       en System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode)
       en System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)
       en System.Data.Linq.DataContext.SubmitChanges()
       en Demo.View.InformeMedico.btnGuardar_Click(Object sender, RoutedEventArgs e) en D:\cs_InformeMedico\app\InformeMedico.xaml.cs:línea 430


    I was trying to update a single field from my mapped table, so what im doing wrong? Im already check XML

    1       public void UpdateEmployeeName(int codigo, char state)  
    2         {  
    3             EXAMENXATENCION ea;  
    4             DBDataContext db = new DBDataContext();  
    5             ea = db.EXAMENXATENCIONs.SingleOrDefault(e => e.codigo == codigo);  
    6  
    7             ea.estadoestudio = state;  
    8             db.SubmitChanges();  
    9         } 


     

    Monday, February 16, 2009 10:03 PM

All replies