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. How to get total no of records from a typed Dataset

How to get total no of records from a typed Dataset

Scheduled Pinned Locked Moved C#
xmldatabasetutorialquestion
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.
  • H Offline
    H Offline
    Herhighness
    wrote on last edited by
    #1

    Hello, I have created a typed dataset using a schema, I am trying to create an instance of this dataset and get the row count. It always returns total count as 0, when I know for sure taht there are 3 records, what am I doing wrong.? InstrumentSettings ds = new InstrumentSettings(); ds.ReadXml(@"C:\Instruments.xml"); int x = ds.Instument.Rows.Count; MessageBox.Show (x.ToString()) Thanks,

    A 1 Reply Last reply
    0
    • H Herhighness

      Hello, I have created a typed dataset using a schema, I am trying to create an instance of this dataset and get the row count. It always returns total count as 0, when I know for sure taht there are 3 records, what am I doing wrong.? InstrumentSettings ds = new InstrumentSettings(); ds.ReadXml(@"C:\Instruments.xml"); int x = ds.Instument.Rows.Count; MessageBox.Show (x.ToString()) Thanks,

      A Offline
      A Offline
      Alvaro Mendez
      wrote on last edited by
      #2

      I remember having the same problem a while back and none of the second parameters I tried passing to ReadXml worked. Oddly enough, using a plain DataSet object worked like a charm. :^) Hopefully someone here will shed some light. Regards, Alvaro


      ... since we've descended to name calling, I'm thinking you're about twenty pounds of troll droppings in a ten pound bag. - Vincent Reynolds

      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