Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. LINQ
  4. update issue

update issue

Scheduled Pinned Locked Moved LINQ
csharpmcphelpquestionannouncement
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tauseef A
    wrote on last edited by
    #1

    hi guys public void Update_Assay(Mapping map) { try { Machine_Integration dc = new Machine_Integration(); var qry = from mapping in dc.GetTable() where mapping.ID == map.ID select mapping; foreach (Mapping mp in qry) { mp.Instrument_Asssay_No = map.Instrument_Asssay_No; mp.Istrument_Assay_Name = map.Istrument_Assay_Name; mp.Nexus_Assay_No = map.Nexus_Assay_No; mp.Assay_Type = map.Assay_Type; } dc.SubmitChanges(); } catch (Exception ex) { throw ex; } } but rows are not updated any idea? regards ,

    Tauseef A Khan MCP Dotnet framework 2.0.

    A 1 Reply Last reply
    0
    • T Tauseef A

      hi guys public void Update_Assay(Mapping map) { try { Machine_Integration dc = new Machine_Integration(); var qry = from mapping in dc.GetTable() where mapping.ID == map.ID select mapping; foreach (Mapping mp in qry) { mp.Instrument_Asssay_No = map.Instrument_Asssay_No; mp.Istrument_Assay_Name = map.Istrument_Assay_Name; mp.Nexus_Assay_No = map.Nexus_Assay_No; mp.Assay_Type = map.Assay_Type; } dc.SubmitChanges(); } catch (Exception ex) { throw ex; } } but rows are not updated any idea? regards ,

      Tauseef A Khan MCP Dotnet framework 2.0.

      A Offline
      A Offline
      Adam Maras
      wrote on last edited by
      #2

      Are you certain any rows are being returned by your query? Set a breakpoint and make sure that your foreach loop is actually being stepped into.

      Adam Maras | Software Developer Microsoft Certified Professional Developer

      T 1 Reply Last reply
      0
      • A Adam Maras

        Are you certain any rows are being returned by your query? Set a breakpoint and make sure that your foreach loop is actually being stepped into.

        Adam Maras | Software Developer Microsoft Certified Professional Developer

        T Offline
        T Offline
        Tauseef A
        wrote on last edited by
        #3

        yes , it is , but there are no primary keys in that particular table , can that be an issue?

        Tauseef A Khan MCP Dotnet framework 2.0.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups