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. The Lounge
  3. what the ...?

what the ...?

Scheduled Pinned Locked Moved The Lounge
csharpdatabaseasp-netdotnetcom
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.
  • M Offline
    M Offline
    Marc Clifton
    wrote on last edited by
    #1

    I have this one Linq2Sql code that is updating a column value. I can see the column updated in the C# code, I can see the PK is correct, but it doesn't update in the DB. When I look at the SQL that Linq2SQL generates, the parameter for the column I'm updating is the old column value. WTF? How can the parameter value be the old value when I see in the C# code the new value??? This isn't an attempt to get help - it's just that I feel like ranting about this. It must be something I'm doing wrong, just haven't figured it out. Driving me nuts. :laugh:

    Latest Article:
    Create a Digital Ocean Droplet for .NET Core Web API with a real SSL Certificate on a Domain

    J 1 Reply Last reply
    0
    • M Marc Clifton

      I have this one Linq2Sql code that is updating a column value. I can see the column updated in the C# code, I can see the PK is correct, but it doesn't update in the DB. When I look at the SQL that Linq2SQL generates, the parameter for the column I'm updating is the old column value. WTF? How can the parameter value be the old value when I see in the C# code the new value??? This isn't an attempt to get help - it's just that I feel like ranting about this. It must be something I'm doing wrong, just haven't figured it out. Driving me nuts. :laugh:

      Latest Article:
      Create a Digital Ocean Droplet for .NET Core Web API with a real SSL Certificate on a Domain

      J Offline
      J Offline
      Johnny J
      wrote on last edited by
      #2

      Try to ask about it on Stackoverflow... :-\

      Anything that is unrelated to elephants is irrelephant
      Anonymous
      -----
      The problem with quotes on the internet is that you can never tell if they're genuine
      Winston Churchill, 1944
      -----
      Never argue with a fool. Onlookers may not be able to tell the difference.
      Mark Twain

      M 1 Reply Last reply
      0
      • J Johnny J

        Try to ask about it on Stackoverflow... :-\

        Anything that is unrelated to elephants is irrelephant
        Anonymous
        -----
        The problem with quotes on the internet is that you can never tell if they're genuine
        Winston Churchill, 1944
        -----
        Never argue with a fool. Onlookers may not be able to tell the difference.
        Mark Twain

        M Offline
        M Offline
        Marc Clifton
        wrote on last edited by
        #3

        Johnny J. wrote:

        Try to ask about it on Stackoverflow...

        :laugh: Turns out it's something in the query that determines what should be updated, which is flipping state between two records. :sigh:

        Latest Article:
        Create a Digital Ocean Droplet for .NET Core Web API with a real SSL Certificate on a Domain

        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