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 table using linq

update table using linq

Scheduled Pinned Locked Moved LINQ
databasecsharplinqhelpquestion
2 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.
  • S Offline
    S Offline
    spankyleo123
    wrote on last edited by
    #1

    Hi, Am reading an excel file containing columns and storing it into the database. The excel sheet contains a column called STATUS which includes (NOT STARTED , IN-PROGRESS , COMPLETE) several rows have different statuses. Everytime the excel sheet is read the values are stored into the table in the db. Now in the latest excel sheet some of the rows have a changed status i.e a row which had STATUS as "NOT-STARTED" in the previous excel sheet, will now have status as "IN-PROGRESS". How do I compare this with the actual data in the database table and update that particular row with the new STATUS using LINQ. Help appreciated,,,

    A 1 Reply Last reply
    0
    • S spankyleo123

      Hi, Am reading an excel file containing columns and storing it into the database. The excel sheet contains a column called STATUS which includes (NOT STARTED , IN-PROGRESS , COMPLETE) several rows have different statuses. Everytime the excel sheet is read the values are stored into the table in the db. Now in the latest excel sheet some of the rows have a changed status i.e a row which had STATUS as "NOT-STARTED" in the previous excel sheet, will now have status as "IN-PROGRESS". How do I compare this with the actual data in the database table and update that particular row with the new STATUS using LINQ. Help appreciated,,,

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      I cant get you. Means you cant get the data from the database and check with the existing value ?? :confused::confused:

      Abhishek Sur


      My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

      **Don't forget to click "Good Answer" if you like to.

      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