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. C#
  4. data table row state unchanged after i changed its values

data table row state unchanged after i changed its values

Scheduled Pinned Locked Moved C#
databasesql-serversysadminhelpquestion
2 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.
  • G Offline
    G Offline
    gus_br
    wrote on last edited by
    #1

    hi my problem is the following: i take one data row (BE.DSPedido.PedidoItemRow pedidoItemRow = dsPedido.PedidoItem[e.RowIndex];) then i change some of its values (eg: pedidoItemRow.DtConferencia = DateTime.Now;) but after, when i test for its status, i get `unchanged` (MessageBox.Show(pedidoItemRow.RowState.ToString());) i haven`t done anything important between these statements (like a AcceptChanges() or something that would affect the row - except other assigments) the problem is that when i call a GetChanges() operation in my dataset i get a null DataTable and i can`t persist the modified values in the SQL Server (it`s mapped through a DataAdaptor update command) any hint? thanks in advance :]

    G 1 Reply Last reply
    0
    • G gus_br

      hi my problem is the following: i take one data row (BE.DSPedido.PedidoItemRow pedidoItemRow = dsPedido.PedidoItem[e.RowIndex];) then i change some of its values (eg: pedidoItemRow.DtConferencia = DateTime.Now;) but after, when i test for its status, i get `unchanged` (MessageBox.Show(pedidoItemRow.RowState.ToString());) i haven`t done anything important between these statements (like a AcceptChanges() or something that would affect the row - except other assigments) the problem is that when i call a GetChanges() operation in my dataset i get a null DataTable and i can`t persist the modified values in the SQL Server (it`s mapped through a DataAdaptor update command) any hint? thanks in advance :]

      G Offline
      G Offline
      gus_br
      wrote on last edited by
      #2

      sorry, nevermind... i have solved it i must call EndEdit() after i make all changes. :]

      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