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. filtering dataset and saving the resultant in another table.

filtering dataset and saving the resultant in another table.

Scheduled Pinned Locked Moved C#
question
4 Posts 4 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.
  • A Offline
    A Offline
    Aslesh
    wrote on last edited by
    #1

    hi i have a dataset which consists of one tables. i need to filter this data set and store it in another table. how can i do this?

    C M 2 Replies Last reply
    0
    • A Aslesh

      hi i have a dataset which consists of one tables. i need to filter this data set and store it in another table. how can i do this?

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      A dataset allows you to set a filter. Then I'm not sure if there's a quicker way than just to iterate over the records and store them.

      Christian Graus Driven to the arms of OSX by Vista.

      S 1 Reply Last reply
      0
      • C Christian Graus

        A dataset allows you to set a filter. Then I'm not sure if there's a quicker way than just to iterate over the records and store them.

        Christian Graus Driven to the arms of OSX by Vista.

        S Offline
        S Offline
        Samer Aburabie
        wrote on last edited by
        #3

        Hi .. There is a quicker way ... use the Select Method of the DataTable

        ds.Tables[0].Select(filterExpression);

        ... read this MSDN article regarding the Select method ... it will help you ... http://msdn.microsoft.com/en-us/library/det4aw50.aspx[^] Hope this helps ...

        Sincerely Samer Abu Rabie Note: Please remember to rate this post to help others whom reading it.

        1 Reply Last reply
        0
        • A Aslesh

          hi i have a dataset which consists of one tables. i need to filter this data set and store it in another table. how can i do this?

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          Use a dataview to do the filtering and you can copy the filtered dataview to a new table (dvData.CopyTable I think)

          Never underestimate the power of human stupidity RAH

          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