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. .NET (Core and Framework)
  4. DataAdapter.Update Within A Transaction

DataAdapter.Update Within A Transaction

Scheduled Pinned Locked Moved .NET (Core and Framework)
announcementbeta-testingquestion
1 Posts 1 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.
  • J Offline
    J Offline
    Jim Matthews
    wrote on last edited by
    #1

    Hey guys, has anyone else run accross this behavior before? When using dataadapter.update within the context of a transaction, if the transaction succeeds your datasource has .acceptchanges called and everything is fine. If that transaction fails however, .acceptchanges is still called. :confused: :| this just doesn't seem right to me? according to a post i found on google ms's recommended way of dealing with this is to make a copy of the data before submitting the update, then if the transaction fails, clear the data and merge the previous version back into the main dataset. i was baffled when i came upon this the other day. does anyone have any insight as to whether this behavior might be changing in the next release of the bcl? i don't have any of the beta's to check it out and i'm more just curious than anything. seems like if the transaction failed they should just leave the rowstate data as is...


    -jim

    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