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. what is the opposite action for Fill(dataset)

what is the opposite action for Fill(dataset)

Scheduled Pinned Locked Moved ASP.NET
databasequestionannouncement
2 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.
  • K Offline
    K Offline
    karanba
    wrote on last edited by
    #1

    I want to get 1. get some data using a SqlDataAdapter from a query on db 2. close connection from db 3. fill a dataset and bind it to a control. 4. making updates on data and post it back to db update all rows back. but it must like saving an excel page. So what can be the best method. Is there anything like opposite action of a dataAdapter fill method. // ACTION 1,2,3 SqlDataAdapter da; using (SqlConnection con = new SqlConnection(connectionString)) { cmd.Connection = con; con.Open(); da = new SqlDataAdapter(cmd) } ds = new Dataset(); da.Fill(ds) ... // bind the data to a control, may be a repeater // which has form inputs field for each row and field of data // user makes changes on data. // ACTION 4 ? update it back to db.

    karanba

    G 1 Reply Last reply
    0
    • K karanba

      I want to get 1. get some data using a SqlDataAdapter from a query on db 2. close connection from db 3. fill a dataset and bind it to a control. 4. making updates on data and post it back to db update all rows back. but it must like saving an excel page. So what can be the best method. Is there anything like opposite action of a dataAdapter fill method. // ACTION 1,2,3 SqlDataAdapter da; using (SqlConnection con = new SqlConnection(connectionString)) { cmd.Connection = con; con.Open(); da = new SqlDataAdapter(cmd) } ds = new Dataset(); da.Fill(ds) ... // bind the data to a control, may be a repeater // which has form inputs field for each row and field of data // user makes changes on data. // ACTION 4 ? update it back to db.

      karanba

      G Offline
      G Offline
      Guy Harwood
      wrote on last edited by
      #2

      well yes, da.Update(ds) providing you specify an update command (i see you have specified a select command when initializing your data adapter)

      ---Guy H (;-)---

      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