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. Web Development
  3. ASP.NET
  4. temporary storage of data

temporary storage of data

Scheduled Pinned Locked Moved ASP.NET
tutorial
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.
  • N Offline
    N Offline
    Noman Nadeem
    wrote on last edited by
    #1

    Hi guys, I have a datagrid (myGrid) populated with a dataset (myDS) myDS is fetched and saved using a web service. everything is working fine. I need an additional functionality of keeping changes (any changes) made on the page temporary until the user clicks on "Save and Finalize" button (btnSave) Can someone please point me in the right direction on how to go about implementing this stuff. Much appreciated. regards, Noman Nadeem :zzz:

    M 1 Reply Last reply
    0
    • N Noman Nadeem

      Hi guys, I have a datagrid (myGrid) populated with a dataset (myDS) myDS is fetched and saved using a web service. everything is working fine. I need an additional functionality of keeping changes (any changes) made on the page temporary until the user clicks on "Save and Finalize" button (btnSave) Can someone please point me in the right direction on how to go about implementing this stuff. Much appreciated. regards, Noman Nadeem :zzz:

      M Offline
      M Offline
      Mike Ellison
      wrote on last edited by
      #2

      Hi Noman. Does "temporary" in this context mean "not persisted to a database"? If so, that should be straight-forward. You could keep the dataset persisted in a Session variable, making changes to it accordingly throughout the session. When the user clicks "Save and Finalize", then run your code to take the Session variable dataset and persist to a database.

      N 1 Reply Last reply
      0
      • M Mike Ellison

        Hi Noman. Does "temporary" in this context mean "not persisted to a database"? If so, that should be straight-forward. You could keep the dataset persisted in a Session variable, making changes to it accordingly throughout the session. When the user clicks "Save and Finalize", then run your code to take the Session variable dataset and persist to a database.

        N Offline
        N Offline
        Noman Nadeem
        wrote on last edited by
        #3

        Hi Mike, thanx for the input, I was kind of hoping for another solution. I ran into a strange problem using the session, maybe u have a solution. First of all, it is an oracle DB. I have an ID field which has to be incremented by value 'x' upon each insert. I'm using myDataView.RowFilter = "type_id = max(type_id)" I get the max inserted ID and increment by 'x' I add using myDataSet.TABLE_NAME.AddRow(blah blah); The first insert works just fine. The next time I get the VersionNotFoundException upon setting the RowFilter for myDataView. I can resolve this by adding the code myDataSet.AcceptChanges(), BUT in this case myDataSet.HasChanges() returns false in my finalize code. My final resolution was make a copy of the dataset, AcceptChanges() for the copy and apply the RowFilter. If you /anyone can suggest a better approach, I would love to check it out. regards, Noman Nadeem :zzz:

        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