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. Number of Rows in a DataSet Table

Number of Rows in a DataSet Table

Scheduled Pinned Locked Moved C#
databasequestion
6 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.
  • B Offline
    B Offline
    budidharma
    wrote on last edited by
    #1

    I have a DataSet that contains a table "results" which is popuated with data from a database. I need to know the number of rows in the "results" table. Is there a simple way to grab this information? A property or some such? Thanks.

    K 1 Reply Last reply
    0
    • B budidharma

      I have a DataSet that contains a table "results" which is popuated with data from a database. I need to know the number of rows in the "results" table. Is there a simple way to grab this information? A property or some such? Thanks.

      K Offline
      K Offline
      KaptinKrunch
      wrote on last edited by
      #2

      DataSet.Tables[0].rows.count :)

      J B 2 Replies Last reply
      0
      • K KaptinKrunch

        DataSet.Tables[0].rows.count :)

        J Offline
        J Offline
        Jared Parsons
        wrote on last edited by
        #3

        or DataSet.Tables[0].Rows.Count :) Jared Parsons jaredp@beanseed.org http://spaces.msn.com/members/jaredp/

        D 1 Reply Last reply
        0
        • K KaptinKrunch

          DataSet.Tables[0].rows.count :)

          B Offline
          B Offline
          budidharma
          wrote on last edited by
          #4

          Thanks!

          1 Reply Last reply
          0
          • J Jared Parsons

            or DataSet.Tables[0].Rows.Count :) Jared Parsons jaredp@beanseed.org http://spaces.msn.com/members/jaredp/

            D Offline
            D Offline
            Drew McGhie
            wrote on last edited by
            #5

            Wouldn't DataSet.Tables["tablename"].Rows.Count be more appropriate? Just in case that table is not #0 in the list?

            J 1 Reply Last reply
            0
            • D Drew McGhie

              Wouldn't DataSet.Tables["tablename"].Rows.Count be more appropriate? Just in case that table is not #0 in the list?

              J Offline
              J Offline
              Jared Parsons
              wrote on last edited by
              #6

              That would be better IMHO. I was more poking fun at casing Jared Parsons jaredp@beanseed.org http://spaces.msn.com/members/jaredp/

              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