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