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. Convert datareader from datatable

Convert datareader from datatable

Scheduled Pinned Locked Moved C#
help
3 Posts 3 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.
  • I Offline
    I Offline
    iramg
    wrote on last edited by
    #1

    how we can create a datareader from a datatable. please suggest any way to solve this problem.

    J I 2 Replies Last reply
    0
    • I iramg

      how we can create a datareader from a datatable. please suggest any way to solve this problem.

      J Offline
      J Offline
      Justin Perez
      wrote on last edited by
      #2
        DataTable dt = new DataTable();
        DataTableReader dr = new DataTableReader(dt);
      

      I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")

      1 Reply Last reply
      0
      • I iramg

        how we can create a datareader from a datatable. please suggest any way to solve this problem.

        I Offline
        I Offline
        il_masacratore
        wrote on last edited by
        #3

        A datareader from a datatable? Are you talking about System.Data.DataTable class?? If its your case I suggest two ways: 1.Make a forecach loop through DataTable.Rows and make anything foreach row. 2.To complement the upper suggestion use DataTable.Select('where clause') and store DataRow[] result in a var and make a foreach loop on this DataRow[].

        Visit my blog at http://dotnetforeveryone.blogspot.com

        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