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. update dataset

update dataset

Scheduled Pinned Locked Moved ASP.NET
questionannouncement
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.
  • H Offline
    H Offline
    h ma
    wrote on last edited by
    #1

    i m using dataadapter to handle dataset..the date is shown in the datagrid..now i want to update the records edited by the user i have used one button to show the records,(in which i hv declared dataadapters and dataset) and behind "edit record" button i want to write the code for updation if i use the command DataAdapter.Update(Dataset); what should i do as the dataadpter and dataset are declared behind the other button?? is there any other option ( i m not using stored procedures)

    $h@ma!|@

    N 1 Reply Last reply
    0
    • H h ma

      i m using dataadapter to handle dataset..the date is shown in the datagrid..now i want to update the records edited by the user i have used one button to show the records,(in which i hv declared dataadapters and dataset) and behind "edit record" button i want to write the code for updation if i use the command DataAdapter.Update(Dataset); what should i do as the dataadpter and dataset are declared behind the other button?? is there any other option ( i m not using stored procedures)

      $h@ma!|@

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      $h@ma!|@ wrote:

      what should i do as the dataadpter and dataset are declared behind the other button?? is there any other option

      In this method you won't get DataSet object in Update button click since it is declared in the View button click. So what you can do is, create a new dataset from the user entered values and update that to DB. Or store the dataset in session temporarily, and in update button click modify the dataset records and call DataAdapter.Update() method.


      My Website | Ask smart questions

      H 1 Reply Last reply
      0
      • N N a v a n e e t h

        $h@ma!|@ wrote:

        what should i do as the dataadpter and dataset are declared behind the other button?? is there any other option

        In this method you won't get DataSet object in Update button click since it is declared in the View button click. So what you can do is, create a new dataset from the user entered values and update that to DB. Or store the dataset in session temporarily, and in update button click modify the dataset records and call DataAdapter.Update() method.


        My Website | Ask smart questions

        H Offline
        H Offline
        h ma
        wrote on last edited by
        #3

        thx but i dun understand how to create dataset from user entered values and update to db:(:doh:

        $h@ma!|@

        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